Class: OperationGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- OperationGenerator
- Defined in:
- lib/generators/operation/operation_generator.rb
Instance Method Summary collapse
Instance Method Details
#controller_name ⇒ Object
14 15 16 |
# File 'lib/generators/operation/operation_generator.rb', line 14 def controller_name operation_name.pluralize + 'Controller' end |
#generate_layout ⇒ Object
6 7 8 |
# File 'lib/generators/operation/operation_generator.rb', line 6 def generate_layout template 'operation.rb.erb', File.join('app/operations', class_path, "#{file_name}_operations.rb") end |
#operation_name ⇒ Object
10 11 12 |
# File 'lib/generators/operation/operation_generator.rb', line 10 def operation_name file_name.camelize end |