Class: Object

Inherits:
BasicObject
Defined in:
lib/try_bang.rb

Instance Method Summary collapse

Instance Method Details

#try!(method_name, *args) ⇒ Object



4
5
6
7
8
9
# File 'lib/try_bang.rb', line 4

def try!(method_name, *args)
  method_name = method_name.to_sym
  if self.respond_to?(method_name, true)
    self.send(method_name, *args)
  end
end