Class: Haml::Generators::CommandControllerGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Haml::Generators::CommandControllerGenerator
- Defined in:
- lib/generators/haml/command_controller/command_controller_generator.rb
Instance Method Summary collapse
- #create_template_file ⇒ Object
-
#initialize(args, *options) ⇒ CommandControllerGenerator
constructor
A new instance of CommandControllerGenerator.
Constructor Details
#initialize(args, *options) ⇒ CommandControllerGenerator
Returns a new instance of CommandControllerGenerator.
18 19 20 21 |
# File 'lib/generators/haml/command_controller/command_controller_generator.rb', line 18 def initialize(args, *) super parse_command_attributes! end |
Instance Method Details
#create_template_file ⇒ Object
23 24 25 |
# File 'lib/generators/haml/command_controller/command_controller_generator.rb', line 23 def create_template_file template 'new.html.haml', File.join('app/views', class_path, "#{file_name}_command", "#{new_action}.html.haml") end |