Class: Disco::Generators::CommandGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Disco::Generators::CommandGenerator
- Includes:
- Domain, EventName, ProcessorName
- Defined in:
- lib/generators/disco/command/command_generator.rb
Instance Method Summary collapse
Methods included from Domain
Methods included from EventName
Methods included from ProcessorName
Instance Method Details
#create_command_file ⇒ Object
18 19 20 |
# File 'lib/generators/disco/command/command_generator.rb', line 18 def create_command_file template 'command.rb.erb', File.join('app/commands', class_path, "#{file_name}_command.rb") end |
#create_related_event_file ⇒ Object
22 23 24 25 |
# File 'lib/generators/disco/command/command_generator.rb', line 22 def return if skip_event? template 'event.rb.erb', File.join('app/events', event_class_path, "#{event_file_name}_event.rb") end |