Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
def append_features_cv(other) # So, the protocol here is that when including +self+ into +target+ # we also include all modules that are included into +self+. hierarchy = other.superclass_chain superclass_chain.reverse_each do |ancestor| if ancestor.instance_of? IncludedModule and not hierarchy.include? ancestor.module IncludedModule.new(ancestor.module).attach_to other end end IncludedModule.new(self).attach_to other end
From the Design Piracy series on my blog: