るりまサーチ

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

別のキーワード

  1. optparse on
  2. optionparser on
  3. tracer on
  4. _builtin abort_on_exception
  5. _builtin abort_on_exception=

ライブラリ

クラス

検索結果

Object#singleton_methods(inherited_too = true) -> [Symbol] (24358.0)

そのオブジェクトに対して定義されている特異メソッド名 (public あるいは protected メソッド) の一覧を返します。

...された特異メソッドや、
self がクラスの場合はスーパークラスのクラスメソッド(Classのインスタンスの特異メソッド)などです。

singleton_methods
(false) は、Object#methods(false) と同じです。

@param inherited_too 継承した特異メソッド...
...1][ruby]{
Parent = Class.new

class
<<Parent
private; def private_class_parent() end
protected; def protected_class_parent() end
public; def public_class_parent() end
end

Foo = Class.new(Parent)

class
<<Foo
private; def private_class_foo() end
protected; def protected_class_foo()...
...end
public; def public_class_foo() end
end

module Bar
private; def private_bar() end
protected; def protected_bar() end
public; def public_bar() end
end

obj = Foo.new
class
<<obj
include Bar
private; def private_self() end
protected; def protected_self() end
public...