Module: Envconfig::Service
Instance Method Summary collapse
-
#[](key) ⇒ Object
A single key from the configuration.
- #initialize(env) ⇒ Object
- #provider ⇒ Object
-
#to_h ⇒ Object
The configuration for the service, as a Hash.
Instance Method Details
#[](key) ⇒ Object
A single key from the configuration.
14 15 16 |
# File 'lib/envconfig/service.rb', line 14 def [](key) config[key] end |
#initialize(env) ⇒ Object
4 5 6 |
# File 'lib/envconfig/service.rb', line 4 def initialize(env) @env = env end |
#provider ⇒ Object
18 19 20 |
# File 'lib/envconfig/service.rb', line 18 def provider @_provider ||= Provider.find(env, self.class.providers) end |
#to_h ⇒ Object
The configuration for the service, as a Hash.
9 10 11 |
# File 'lib/envconfig/service.rb', line 9 def to_h config end |