Class: Rails::CommandGenerator

Inherits:
Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/rails/command_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_commandObject



8
9
10
11
# File 'lib/generators/rails/command_generator.rb', line 8

def create_command
  template('command.rb', "app/commands/#{file_name.underscore}.rb")
  template('command_spec.rb', "spec/commands/#{file_name.underscore}_spec.rb")
end