Class: Object

Inherits:
BasicObject
Defined in:
lib/core_ext/object.rb

Instance Method Summary collapse

Instance Method Details

#tapp(prefix = nil, &block) ⇒ Object



2
3
4
5
6
7
# File 'lib/core_ext/object.rb', line 2

def tapp(prefix = nil, &block)
  block ||= lambda {|x| x }
  str = if block[self].is_a? String then block[self] else block[self].inspect end
  puts [prefix, str].compact.join(": ")
  self
end