Class: Blinkist::Config
- Inherits:
-
Object
- Object
- Blinkist::Config
- Defined in:
- lib/blinkist/config.rb,
lib/blinkist/config/version.rb,
lib/blinkist/config/adapters/adapter.rb,
lib/blinkist/config/adapters/env_adapter.rb,
lib/blinkist/config/adapters/diplomat_adapter.rb
Defined Under Namespace
Classes: Adapter, DiplomatAdapter, EnvAdapter
Constant Summary collapse
- VERSION =
"1.0.2".freeze
Class Attribute Summary collapse
-
.adapter_type ⇒ Object
Returns the value of attribute adapter_type.
-
.app_name ⇒ Object
Returns the value of attribute app_name.
-
.env ⇒ Object
Returns the value of attribute env.
-
.logger ⇒ Object
Returns the value of attribute logger.
Class Method Summary collapse
Class Attribute Details
.adapter_type ⇒ Object
Returns the value of attribute adapter_type.
8 9 10 |
# File 'lib/blinkist/config.rb', line 8 def adapter_type @adapter_type end |
.app_name ⇒ Object
Returns the value of attribute app_name.
8 9 10 |
# File 'lib/blinkist/config.rb', line 8 def app_name @app_name end |
.env ⇒ Object
Returns the value of attribute env.
8 9 10 |
# File 'lib/blinkist/config.rb', line 8 def env @env end |
.logger ⇒ Object
Returns the value of attribute logger.
8 9 10 |
# File 'lib/blinkist/config.rb', line 8 def logger @logger end |
Class Method Details
.adapter ⇒ Object
14 15 16 |
# File 'lib/blinkist/config.rb', line 14 def adapter @adapter ||= Adapter.instance_for adapter_type, env, app_name end |
.get(key, default = nil, scope: nil) ⇒ Object
10 11 12 |
# File 'lib/blinkist/config.rb', line 10 def get(key, default = nil, scope: nil) adapter.get(key, scope: scope) || default end |