Skip to content

Use a configuration block instead of defining "namespace" and "config_file" etc in the module itself #11

Open
@acook

Description

@acook

Right now namespace and config_file and soon config_env are defined on the module itself, while its only a handful of methods, it might be cleaner to do this in a configuration block:

module ExampleConfig
  extend ConfigModule
  config_module do
    file 'config/example.yml'
    env :example
    namespace config_module.env
  end
end

or maybe...

module ExampleConfig
  extend ConfigModule.setup do
    file 'config/example.yml'
    env :example
    namespace config_module.env
  end
end

This would also allow for lazy evaluation of methods that will be defined by the user on the module itself.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions