Class: Cqs::Generators::CommandGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_command_fileObject



5
6
7
8
9
10
# File 'lib/generators/cqs/command/command_generator.rb', line 5

def create_command_file
  template "command.rb", File.join(
    "app/commands/command",
    "#{file_name}.rb"
  )
end

#create_command_spec_fileObject



12
13
14
15
16
17
# File 'lib/generators/cqs/command/command_generator.rb', line 12

def create_command_spec_file
  template "command_spec.rb", File.join(
    "spec/commands/command",
    "#{file_name}_spec.rb"
  )
end