Class: Rails::Generators::QueryGenerator
- Inherits:
-
NamedBase
- Object
- NamedBase
- Rails::Generators::QueryGenerator
- Defined in:
- lib/generators/query/query_generator.rb
Instance Method Summary collapse
- #create_query_definitions_file ⇒ Object
- #create_query_file ⇒ Object
- #create_query_test_file ⇒ Object
Instance Method Details
#create_query_definitions_file ⇒ Object
20 21 22 |
# File 'lib/generators/query/query_generator.rb', line 20 def create_query_definitions_file template "query_definitions.rb", File.join("app/queries/definitions", class_path, "#{file_name}_query_definitions.rb") end |
#create_query_file ⇒ Object
16 17 18 |
# File 'lib/generators/query/query_generator.rb', line 16 def create_query_file template "query.rb", File.join("app/queries", class_path, "#{file_name}_query.rb") end |
#create_query_test_file ⇒ Object
24 25 26 27 28 |
# File 'lib/generators/query/query_generator.rb', line 24 def create_query_test_file unless [:skip_unit_test] template "unit_test.rb", File.join("test/queries", class_path, "#{file_name}_query_test.rb") end end |