Class: SteelWheel::QueryGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- SteelWheel::QueryGenerator
- Defined in:
- lib/generators/steel_wheel/query/query_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_files ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/generators/steel_wheel/query/query_generator.rb', line 7 def copy_files if behavior == :revoke template 'query_template.rb', "app/handlers/#{file_path}_handler/query.rb" elsif behavior == :invoke empty_directory Pathname.new('app/queries').join(*class_path) template 'query_template.rb', "app/handlers/#{file_path}_handler/query.rb" end end |