diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-18 23:32:01 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-19 01:36:06 +0100 |
commit | e1029be1ebe0e44cdad75dc9b1bdfd3957c245bc (patch) | |
tree | a3d7c4e9750618bcdbe616986ba402736306074b /railties/lib/generators | |
parent | e6a68a5cc3b47865abbba59bf693215c50136002 (diff) | |
download | rails-e1029be1ebe0e44cdad75dc9b1bdfd3957c245bc.tar.gz rails-e1029be1ebe0e44cdad75dc9b1bdfd3957c245bc.tar.bz2 rails-e1029be1ebe0e44cdad75dc9b1bdfd3957c245bc.zip |
Since Rails will require Ruby >= 1.8.7, we can rely on instance_exec.
Diffstat (limited to 'railties/lib/generators')
-rw-r--r-- | railties/lib/generators/rails/plugin/plugin_generator.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/railties/lib/generators/rails/plugin/plugin_generator.rb b/railties/lib/generators/rails/plugin/plugin_generator.rb index ee785caf7d..b68b8691db 100644 --- a/railties/lib/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/generators/rails/plugin/plugin_generator.rb @@ -20,15 +20,15 @@ module Rails directory 'tasks', plugin_dir('tasks') end - hook_for :generator do |instance, generator| - instance.inside instance.send(:plugin_dir), :verbose => true do - instance.invoke generator, [ instance.name ], :namespace => false + hook_for :generator do |generator| + inside plugin_dir, :verbose => true do + invoke generator, [ name ], :namespace => false end end - hook_for :test_framework do |instance, test_framework| - instance.inside instance.send(:plugin_dir), :verbose => true do - instance.invoke test_framework + hook_for :test_framework do |test_framework| + inside plugin_dir, :verbose => true do + invoke test_framework end end |