Module: Kernel
- Defined in:
- lib/dbus/core_ext/kernel/singleton_class.rb
Overview
copied from activesupport/core_ext from Rails, MIT license
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.
11 12 13 |
# File 'lib/dbus/core_ext/kernel/singleton_class.rb', line 11 def class_eval(*args, &block) singleton_class.class_eval(*args, &block) end |
#singleton_class ⇒ Object
Returns the object’s singleton class.
4 5 6 7 8 |
# File 'lib/dbus/core_ext/kernel/singleton_class.rb', line 4 def singleton_class class << self self end end |