Class: Object

Inherits:
BasicObject
Defined in:
lib/core_ext/object/try.rb,
lib/core_ext/object/meta_class.rb

Instance Method Summary collapse

Instance Method Details

#meta_classObject



2
3
4
# File 'lib/core_ext/object/meta_class.rb', line 2

def meta_class
  (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