class RailsEventStore::Generators::BoundedContextGenerator

Public Instance Methods

create_bounded_context() click to toggle source
# 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

Private Instance Methods

bounded_context_name() click to toggle source
# File lib/generators/rails_event_store/bounded_context_generator.rb, line 25
def bounded_context_name
  name.underscore
end
bounded_context_namespace() click to toggle source
# File lib/generators/rails_event_store/bounded_context_generator.rb, line 21
def bounded_context_namespace
  name.camelize
end