Class: BaseGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- BaseGenerator
- Defined in:
- lib/generators/base_generator.rb
Overview
Base class for all generators to come. If you want to override some behaviour, all you got to do is override a method in the child class.
Direct Known Subclasses
FormGenerator, PolicyGenerator, PoroGenerator, ServiceGenerator
Instance Method Summary collapse
-
#copy_pattern_file ⇒ Object
Creates the file for the requested pattern based on a template file.
-
#copy_pattern_test_file ⇒ Object
Creates the test file for the request pattern based on a template file.
Instance Method Details
#copy_pattern_file ⇒ Object
Creates the file for the requested pattern based on a template file.
11 12 13 |
# File 'lib/generators/base_generator.rb', line 11 def copy_pattern_file template "#{pattern_name}.rb", generated_file_path end |
#copy_pattern_test_file ⇒ Object
Creates the test file for the request pattern based on a template file.
16 17 18 |
# File 'lib/generators/base_generator.rb', line 16 def copy_pattern_test_file template "#{pattern_name}_#{test_suite_identifier}.rb", generated_test_file_path end |