提交 b210d9e7 编写于 作者: J José Valim

Merge pull request #532 from amatsuda/update_script

Revert "Delegate everything to the generator"
......@@ -9,11 +9,21 @@ def initialize(generator)
@options = generator.options
end
private
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
def method_missing(meth, *args, &block)
@generator.send(meth, *args, &block)
end
# 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
end
# The application builder allows you to override elements of the application
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册