Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
acook opened this issue Apr 9, 2013 · 0 comments · May be fixed by #41
Open
Assignees

Comments

@acook
Copy link
Owner

acook commented Apr 9, 2013

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.

@ghost ghost assigned acook Apr 9, 2013
This was referenced Oct 3, 2015
@acook acook linked a pull request Jun 19, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant