Class: Module
- Inherits:
-
Object
- Object
- Module
- Defined in:
- lib/contracts/core_ext.rb
Instance Method Summary collapse
-
#singleton_class ⇒ Object
Compatibility with ruby 1.8.
-
#singleton_class? ⇒ Boolean
Compatibility with ruby 1.8.
Instance Method Details
#singleton_class ⇒ Object
Compatibility with ruby 1.8
4 5 6 |
# File 'lib/contracts/core_ext.rb', line 4 def singleton_class class << self; self; end end |
#singleton_class? ⇒ Boolean
Compatibility with ruby 1.8
11 12 13 |
# File 'lib/contracts/core_ext.rb', line 11 def singleton_class? self <= Object.singleton_class end |