Class: RailsEventStore::Generators::BoundedContextGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_bounded_contextObject



11
12
13
14
15
16
17
# File 'lib/generators/rails_event_store/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 { "config.paths.add '#{bounded_context_name}/lib', eager_load: true" }
end