Class: TCB::Generators::DomainGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/tcb/domain/domain_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_domain_moduleObject



17
18
19
20
# File 'lib/generators/tcb/domain/domain_generator.rb', line 17

def create_domain_module
  return if options[:skip_domain]
  template "domain_module.rb.tt", "app/domain/#{module_name.underscore}.rb"
end

#create_handlersObject



22
23
24
25
26
27
28
# File 'lib/generators/tcb/domain/domain_generator.rb', line 22

def create_handlers
  return if options[:skip_domain]
  parsed_commands.each do |cmd|
    @current_command = cmd
    template "command_handler.rb.tt", cmd.handler_file_path(module_name.underscore)
  end
end