Module: Kernel

Defined in:
lib/ext/kernel.rb

Instance Method Summary collapse

Instance Method Details

#ergo(&b) ⇒ Object



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

def ergo(&b)
  if block_given?
    b.arity == 1 ? yield(self) : instance_eval(&b)
  else
    self
  end
end