るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.026秒)
トップページ > クラス:Object[x] > 種類:インスタンスメソッド[x] > クエリ:Module[x] > クエリ:class[x] > クエリ:extend[x] > クエリ:singleton_methods[x]

別のキーワード

  1. mutex_m extend_object
  2. json extend
  3. irb/extend-command def_extend_command
  4. irb/extend-command install_extend_commands
  5. module extend_object

ライブラリ

検索結果

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

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

...た特異メソッドとは Object#extend によって追加された特異メソッドや、
self がクラスの場合はスーパークラスのクラスメソッド(Classのインスタンスの特異メソッド)などです。

singleton_methods
(false) は、Object#methods(false) と同じで...
...by]{
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;...