Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
module Bar def self.included(base) base.extend ClassMethods end module ClassMethods def super_foo class_eval do %w{foo bar}.each do |x| define_method "fuck_#{x}" do puts "calling x in method: #{x}" end end end end end end class Foo include ::Bar attr_accessor :foo, :bar super_foo end f = Foo.new f.fuck_foo ## output sneaky:Desktop rsl$ ruby test.rb calling x in method: foo
This paste will be private.
From the Design Piracy series on my blog: