method

singleton_class?

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - Class: Module
singleton_class?() public

Returns true if mod is a singleton class or false if it is an ordinary class or module.

class C
end
C.singleton_class?                  #=> false
C.singleton_class.singleton_class?  #=> true
Show source
Register or log in to add new notes.