Archive for June 9th, 2008
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.
Add comment June 9, 2008