Permalink
Browse files

Merge pull request #532 from amatsuda/update_script

Revert "Delegate everything to the generator"
  • Loading branch information...
2 parents 2bff301 + 00379ee commit b210d9e722aace63909fb1ebe1b1434ded650ead @josevalim josevalim committed May 12, 2011
Showing with 14 additions and 4 deletions.
  1. +14 −4 railties/lib/rails/generators/rails/app/app_generator.rb
View
18 railties/lib/rails/generators/rails/app/app_generator.rb
@@ -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

0 comments on commit b210d9e

Please sign in to comment.