Class: Disco::Generators::CommandGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
Domain, EventName, ProcessorName
Defined in:
lib/generators/disco/command/command_generator.rb

Instance Method Summary collapse

Methods included from Domain

#domain_class_path

Methods included from EventName

#initialize

Methods included from ProcessorName

#initialize

Instance Method Details

#create_command_fileObject



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


22
23
24
25
# File 'lib/generators/disco/command/command_generator.rb', line 22

def create_related_event_file
  return if skip_event?
  template 'event.rb.erb', File.join('app/events', event_class_path, "#{event_file_name}_event.rb")
end