Class: Haml::Generators::CommandControllerGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/haml/command_controller/command_controller_generator.rb

Instance Method Summary collapse

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, *options)
  super
  parse_command_attributes!
end

Instance Method Details

#create_template_fileObject



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