Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/core_ext/object/try.rb,
lib/core_ext/object/meta_class.rb
Instance Method Summary collapse
- #meta_class ⇒ Object
-
#try(method, *args, &block) ⇒ Object
alias_method :try, :__send__.
Instance Method Details
#meta_class ⇒ Object
2 3 4 |
# File 'lib/core_ext/object/meta_class.rb', line 2 def (class << self; self; end) end |
#try(method, *args, &block) ⇒ Object
alias_method :try, :__send__
3 4 5 |
# File 'lib/core_ext/object/try.rb', line 3 def try(method, *args, &block) send(method, *args, &block) if respond_to?(method) end |