るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.172秒)
トップページ > 種類:インスタンスメソッド[x] > バージョン:2.5.0[x] > クエリ:l[x] > クエリ:i[x] > クエリ:bool[x] > クエリ:singleton_class?[x]

別のキーワード

  1. socket bool
  2. option bool
  3. win32ole vt_bool
  4. variant vt_bool
  5. bool socket::option

ライブラリ

クラス

検索結果

Module#singleton_class? -> bool (100246.0)

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

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

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