RubyDiff Grocks Metaprogramming

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.

Leave a comment

Filed under ruby, ruby_diff

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s