るりまサーチ

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

別のキーワード

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

検索結果

Module#singleton_class? -> bool (12229.0)

self が特異クラスの場合に true を返します。そうでなければ false を返し ます。

...self が特異クラスの場合に true を返します。そうでなければ false を返し
ます。

//emlist[例][ruby]{
class C
end
C.singleton_class? # => false
C.singleton_class.singleton_class? # => true
//}...