Friday, February 15, 2008

Ruby debug method Object.tap

class Object
def tap
yield self
self
end
end
references:
http://moonbase.rydia.net/mental/blog/programming/eavesdropping-on-expressions

No comments:

Post a Comment