Module: SgtnClient::Configuration
- Defined in:
- lib/sgtn-client/core/config.rb
Overview
include Exceptions
Instance Method Summary collapse
- #config ⇒ Object
- #set_config(env, override_configurations = {}) ⇒ Object (also: #config=)
Instance Method Details
#config ⇒ Object
11 12 13 |
# File 'lib/sgtn-client/core/config.rb', line 11 def config @config ||= Config.config end |
#set_config(env, override_configurations = {}) ⇒ Object Also known as: config=
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/sgtn-client/core/config.rb', line 15 def set_config(env, override_configurations = {}) @config = case env when Config env when Hash begin config.dup.merge!(env) rescue Errno::ENOENT => error Config.new(env) end else Config.config(env, override_configurations) end end |