Skip to content

Instantly share code, notes, and snippets.

@adelcambre
Created June 12, 2009 17:32
Show Gist options
  • Select an option

  • Save adelcambre/128780 to your computer and use it in GitHub Desktop.

Select an option

Save adelcambre/128780 to your computer and use it in GitHub Desktop.
class Collector
@@dependencies = []
def self.collect(str)
collector = new
collector.instance_eval(str)
collector
end
def initialize
end
def dependencies
@@dependencies
end
def gem(*args)
puts "Got gem #{args.inspect}"
@@dependencies << args
end
def require(*args)
nil
end
def method_missing(*args)
self
end
class Rails
class Initializer
def self.run
c = Class.new(Collector).new
yield c
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment