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: gem, metaprogramming, ruby, ruby_diff.
Trackback this post | Subscribe to the comments via RSS Feed