るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.090秒)

別のキーワード

  1. win32ole ole_methods
  2. win32ole ole_func_methods
  3. win32ole ole_put_methods
  4. win32ole ole_get_methods
  5. fileutils methods

ライブラリ

検索結果

Module#public_instance_methods(inherited_too = true) -> [Symbol] (24222.0)

そのモジュールで定義されている public メソッド名 の一覧を配列で返します。

...そのモジュールで定義されている public メソッド名
の一覧を配列で返します。

@param inherited_too false を指定するとそのモジュールで定義されているメソッドのみ返します。


@see Object#public_methods, Module#instance_methods...

Module#instance_methods(inherited_too = true) -> [Symbol] (6205.0)

そのモジュールで定義されている public および protected メソッド名 の一覧を配列で返します。

...lic および protected メソッド名
の一覧を配列で返します。

@param inherited_too false を指定するとそのモジュールで定義されているメソッドのみ返します。

@see Object#methods

//emlist[例1][ruby]{
class Foo
private; def private_foo() end
prote...
...end

# あるクラスのインスタンスメソッドの一覧を得る
p Foo.instance_methods(false)
p Foo.public_instance_methods(false)
p Foo.private_instance_methods(false)
p Foo.protected_instance_methods(false)

class Bar < Foo
end
//}

実行結果

[:protected_foo, :public_foo]
[...
...stance_methods(true) - Object.instance_methods(true)
p Bar.public_instance_methods(true) - Object.public_instance_methods(true)
p Bar.private_instance_methods(true) - Object.private_instance_methods(true)
p Bar.protected_instance_methods(true) - Object.protected_instance_methods(true)...