Class: MaxExchangeApi::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/max_exchange_api/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#loggerObject

Returns the value of attribute logger.



6
7
8
# File 'lib/max_exchange_api/config.rb', line 6

def logger
  @logger
end

#timeoutObject

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