Class: MaxExchangeApi::Config
- Inherits:
-
Object
- Object
- MaxExchangeApi::Config
- Defined in:
- lib/max_exchange_api/config.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(data = nil) ⇒ Config
constructor
A new instance of Config.
- #reverse_merge!(other) ⇒ Object
Constructor Details
#initialize(data = nil) ⇒ Config
Returns a new instance of Config.
8 9 10 11 12 |
# File 'lib/max_exchange_api/config.rb', line 8 def initialize(data = nil) data ||= {} @timeout = data[:timeout] @logger = data[:logger] end |
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
6 7 8 |
# File 'lib/max_exchange_api/config.rb', line 6 def logger @logger end |
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/max_exchange_api/config.rb', line 5 def timeout @timeout end |
Instance Method Details
#reverse_merge!(other) ⇒ Object
14 15 16 17 |
# File 'lib/max_exchange_api/config.rb', line 14 def reverse_merge!(other) @timeout ||= other.timeout @logger ||= other.logger end |