Open source is wide open
Monday, September 22, 2008
Three ways to invoke a method in ruby
1. object = Object.new
puts object.object_id
#=> 282660
2. puts object.send(:object_id)
#=> 282660
3. puts object.method(:object_id).call
#=> 282660
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment