Class: NexusCqrs::QueryGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- NexusCqrs::QueryGenerator
- Defined in:
- lib/generators/nexus_cqrs/query_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_query_file ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/generators/nexus_cqrs/query_generator.rb', line 9 def copy_query_file file_path = class_name.underscore @permission = ['permission'] template('query.rb', "app/domain/queries/#{file_path}.rb") template('query_handler.rb', "app/domain/queries/#{file_path}_handler.rb") register_query end |