Class: Rails::CommandGenerator
- Inherits:
-
Generators::NamedBase
- Object
- Generators::NamedBase
- Rails::CommandGenerator
- Defined in:
- lib/generators/rails/command_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_files ⇒ Object
11 12 13 14 15 |
# File 'lib/generators/rails/command_generator.rb', line 11 def copy_files path = File.join('app', 'commands', class_path, "#{file_name}_command.rb") empty_directory('app/commands') template('command.rb.tt', path) end |
#copy_specs ⇒ Object
17 18 19 20 21 |
# File 'lib/generators/rails/command_generator.rb', line 17 def copy_specs path = File.join('spec', 'commands', class_path, "#{file_name}_command_spec.rb") empty_directory('spec/commands') template('spec.rb.tt', path) end |