Class: BoundedContext::Generators::BoundedContextGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/bounded_context/bounded_context_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_bounded_contextObject



11
12
13
14
15
16
17
18
19
# File 'lib/generators/bounded_context/bounded_context_generator.rb', line 11

def create_bounded_context
  create_file "#{bounded_context_name}/lib/#{bounded_context_name}/.keep"

  template "module.rb", "#{bounded_context_name}/lib/#{bounded_context_name}.rb"

  application do
    "config.paths.add '#{bounded_context_name}/lib', eager_load: true"
  end
end