Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Forbidden Fruit: A Taste of Ruby's ParseTree

8,652 views

Published on

My Goruco 2008 presentation on Parse Tree and friends.

Published in: Technology, Education
  • PDF too: http://errtheblog.com/static/pdfs/goruco2008.pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Forbidden Fruit: A Taste of Ruby's ParseTree

  1. 1. Chris Wanstrath http://github.com/defunkt
  2. 2. • define_method • Class.new • instance_eval • send
  3. 3. class Person singleton = (class self; self end) tons_of_class_methods.each do |name, body| singleton.send(:define_method, name, ) end end
  4. 4. class Class def singleton (class self; self end) end def define_class_method(name, ) singleton.send(:define_method, name, ) end end
  5. 5. class Person tons_of_class_methods.each do |name, body| define_class_method name, end end
  6. 6. Ruby is powerful
  7. 7. 'rake'.sub 'r', 's'

×