Delegate everything to the generator

This commit is contained in:
wycats
2010-10-06 02:58:49 -07:00
parent 848eb0d777
commit 0904e82568

View File

@@ -14,21 +14,11 @@ module Rails
@options = generator.options
end
private
%w(template copy_file directory empty_directory inside
empty_directory_with_gitkeep create_file chmod shebang).each do |method|
class_eval <<-RUBY, __FILE__, __LINE__ + 1
def #{method}(*args, &block)
@generator.send(:#{method}, *args, &block)
end
RUBY
end
private
# TODO: Remove once this is fully in place
def method_missing(meth, *args, &block)
STDERR.puts "Calling #{meth} with #{args.inspect} with #{block}"
@generator.send(meth, *args, &block)
end
def method_missing(meth, *args, &block)
@generator.send(meth, *args, &block)
end
end
class AppBuilder