Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
module VitaminedGems class VitaminedGem def initialize(config) @config = config end def github(name, options = {}) options.reverse_merge! \ :lib => name.split('-', 2).last, :source => 'http://gems.github.com' @config.gem(name, options) end end def gem_with_vitamins(*args) args.empty? ? VitaminedGem.new(self) : gem_without_vitamins(*args) end def self.included(base) base.alias_method_chain :gem, :vitamins end end Rails::Configuration.class_eval do include VitaminedGems end
This paste will be private.
From the Design Piracy series on my blog: