Class: AppQuery::Generators::ExampleGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- AppQuery::Generators::ExampleGenerator
- Defined in:
- lib/generators/app_query/example_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_application_query ⇒ Object
14 15 16 17 18 |
# File 'lib/generators/app_query/example_generator.rb', line 14 def create_application_query return if File.exist?(application_query_path) template "application_query.rb", application_query_path end |
#create_example_files ⇒ Object
20 21 22 23 |
# File 'lib/generators/app_query/example_generator.rb', line 20 def create_example_files template "example_query.rb", File.join(query_path, "example_query.rb") template "example.sql.erb", File.join(query_path, "example.sql.erb") end |