class BoundedContext::Generators::BoundedContextGenerator

Public Instance Methods

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

Private Instance Methods

bounded_context_name() click to toggle source
# File lib/generators/bounded_context/bounded_context_generator.rb, line 27
def bounded_context_name
  name.underscore
end
bounded_context_namespace() click to toggle source
# File lib/generators/bounded_context/bounded_context_generator.rb, line 23
def bounded_context_namespace
  name.camelize
end