Class: Object

Inherits:
BasicObject
Defined in:
lib/ext/core.rb

Instance Method Summary collapse

Instance Method Details

#tap {|_self| ... } ⇒ Object

ruby 1.8.6 backport of tap

Yields:

  • (_self)

Yield Parameters:

  • _self (Object)

    the object that the method was called on



3
4
5
6
# File 'lib/ext/core.rb', line 3

def tap
  yield(self)
  self
end