RubyDiff Grocks Metaprogramming

June 9, 2008

RubyDiff now understands some basic metaprogramming features.  So now if you had some hypothetical waffles…

Waffle A

class Waffle
end

Waffle B

class Waffle
  attr_reader   :type
  attr_accessor :awesome_factor
end

You can see that the waffle has some new accessors

./bin/ruby_diff waffle.rb waffle_plus.rb
c  Waffle
+    Waffle {accessor awesome_factor}
+    Waffle {reader type}

Pretty neat huh? Grab the new 0.1.5 gem and also checkout the changelog for more details.  So a proof of concept is in, next up, figure out how to make it extendable so that we can have our Rails, Merb, ActiveRecord, DataMapper, or LobsterShack metaprogramming.

Entry Filed under: ruby, ruby_diff. Tags: , , , .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


AdamSanderson

del.icio.us

Feeds

Pages

 

June 2008
M T W T F S S
« May   Sep »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Archives

Blogroll

Meta