Module: Envconfig::Service

Included in:
Database, Memcached, Mongodb, Redis, Smtp
Defined in:
lib/envconfig/service.rb

Instance Method Summary collapse

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

#providerObject



18
19
20
# File 'lib/envconfig/service.rb', line 18

def provider
  @_provider ||= Provider.find(env, self.class.providers)
end

#to_hObject

The configuration for the service, as a Hash.



9
10
11
# File 'lib/envconfig/service.rb', line 9

def to_h
  config
end