Module: ConfigFor::Sinatra
- Defined in:
- lib/config_for/sinatra.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#config_for(name) ⇒ ActiveSupport::HashWithIndifferentAccess
Convenience loading of config files.
Class Method Details
.registered(base) ⇒ Object
6 7 8 |
# File 'lib/config_for/sinatra.rb', line 6 def self.registered(base) base.set :config_path, lambda { File.join(base.settings.root, 'config') } end |
Instance Method Details
#config_for(name) ⇒ ActiveSupport::HashWithIndifferentAccess
Convenience loading of config files.
21 22 23 |
# File 'lib/config_for/sinatra.rb', line 21 def config_for(name) ConfigFor.load_config!(settings.config_path, name, settings.environment) end |