Module: Kernel
- Defined in:
- lib/twitter/core_ext/kernel.rb
Instance Method Summary collapse
- #calling_method ⇒ Object
-
#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 (exists in Ruby 1.9.2).
Instance Method Details
#calling_method ⇒ Object
3 4 5 |
# File 'lib/twitter/core_ext/kernel.rb', line 3 def calling_method caller[1][/`([^']*)'/, 1].to_sym end |
#class_eval(*args, &block) ⇒ Object
class_eval on an object acts like singleton_class.class_eval.
11 12 13 |
# File 'lib/twitter/core_ext/kernel.rb', line 11 def class_eval(*args, &block) singleton_class.class_eval(*args, &block) end |
#singleton_class ⇒ Object
Returns the object’s singleton class (exists in Ruby 1.9.2)
8 |
# File 'lib/twitter/core_ext/kernel.rb', line 8 def singleton_class; class << self; self; end; end |