Module: Kernel
- Defined in:
- lib/exceptioner/core_ext/kernel/singleton_class.rb
Instance Method Summary collapse
-
#class_eval(*args, &block) ⇒ Object
class_eval on an object acts like singleton_class.class_eval.
-
#singleton_class ⇒ Object
Returns the object’s singleton class.
Instance Method Details
#class_eval(*args, &block) ⇒ Object
class_eval on an object acts like singleton_class.class_eval.
10 11 12 |
# File 'lib/exceptioner/core_ext/kernel/singleton_class.rb', line 10 def class_eval(*args, &block) singleton_class.class_eval(*args, &block) end |
#singleton_class ⇒ Object
Returns the object’s singleton class.
3 4 5 6 7 |
# File 'lib/exceptioner/core_ext/kernel/singleton_class.rb', line 3 def singleton_class class << self self end end |