skip to main | skip to sidebar

yuweijun'blog

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

发表者 俞 伟军 位置在: 2/15/2008 03:13:00 PM

标签: Debug , Object , Ruby , tap

No comments :

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments ( Atom )

About Me

My Photo
俞 伟军
View my complete profile

Blog Archive

  • ►  2011 ( 19 )
    • ►  December ( 1 )
    • ►  July ( 9 )
    • ►  May ( 1 )
    • ►  April ( 3 )
    • ►  January ( 5 )
  • ►  2010 ( 41 )
    • ►  December ( 3 )
    • ►  November ( 3 )
    • ►  October ( 6 )
    • ►  September ( 1 )
    • ►  August ( 2 )
    • ►  July ( 6 )
    • ►  June ( 3 )
    • ►  May ( 9 )
    • ►  April ( 1 )
    • ►  March ( 5 )
    • ►  February ( 1 )
    • ►  January ( 1 )
  • ►  2009 ( 55 )
    • ►  December ( 5 )
    • ►  November ( 2 )
    • ►  October ( 1 )
    • ►  September ( 2 )
    • ►  August ( 6 )
    • ►  July ( 9 )
    • ►  May ( 4 )
    • ►  April ( 5 )
    • ►  March ( 8 )
    • ►  February ( 6 )
    • ►  January ( 7 )
  • ▼  2008 ( 260 )
    • ►  December ( 22 )
    • ►  November ( 13 )
    • ►  October ( 36 )
    • ►  September ( 4 )
    • ►  August ( 31 )
    • ►  July ( 34 )
    • ►  June ( 10 )
    • ►  May ( 9 )
    • ►  April ( 21 )
    • ►  March ( 22 )
    • ▼  February ( 23 )
      • google 网站管理员工具
      • CSS float and document flow difference between fir...
      • [CSS Zen Garden] CSS absolute position and relativ...
      • [CSS Zen Garden] Position fixed property of CSS2 a...
      • [CSS Zen Garden]The Negative-Margin Solution for C...
      • [CSS Zen Garden]Centered Design Using Auto Margins
      • Javascript event delegation
      • IE6 javascript bug
      • Cleaning up rails old session file
      • [Rails Cookbook Recipe 10.2] Fixing Bugs at the So...
      • [Rails Cookbook Recipe 4.9] Inspecting Requests wi...
      • Javascript function results caching
      • Usage of linux command: tee
      • Translate selection text to chinese in new window
      • Ruby debug method Object.tap
      • ruby rss aggregator using feed-normalizer
      • curry - functional javascript
      • Ruby class variable, class attribute(class instanc...
      • Using parseFloat() or "+" instead of parseInt()
      • Using javascript copy text string to user's clipboard
      • gem unpack usage and example
      • MySQL 同步1064错误及补救方法
      • Using acts_as_taggable in Rails
    • ►  January ( 35 )
  • ►  2007 ( 346 )
    • ►  December ( 16 )
    • ►  November ( 12 )
    • ►  October ( 17 )
    • ►  September ( 31 )
    • ►  August ( 50 )
    • ►  July ( 28 )
    • ►  June ( 24 )
    • ►  May ( 38 )
    • ►  April ( 53 )
    • ►  March ( 48 )
    • ►  February ( 29 )
  • ►  2006 ( 1 )
    • ►  November ( 1 )