Class: SimplerCommandGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/simpler_command/simpler_command_generator.rb

Overview

SimplerCommand Generator.

Generates a command using SimplerCommand.

Provide arguments to assist with boilerplate generation of your commands.

Examples

rails generator simpler_command EnableMaintainance # => app/commands/enable_maintainance.rb
rails generator simpler_command PublishArticle article # => app/commands/publish_article.rb

Instance Method Summary collapse

Instance Method Details

#add_command_templateObject



18
19
20
# File 'lib/generators/simpler_command/simpler_command_generator.rb', line 18

def add_command_template
  template "command.rb.erb", "app/commands/#{file_name}.rb"
end