Class: Object

Inherits:
BasicObject
Defined in:
lib/cf/object_extensions.rb

Instance Method Summary collapse

Instance Method Details

#try(*a, &b) ⇒ Object



2
3
4
5
6
7
8
# File 'lib/cf/object_extensions.rb', line 2

def try(*a, &b)
  if a.empty? && block_given?
    yield self
  else
    __send__(*a, &b)
  end
end