Class: FTX::API::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = nil) ⇒ Config

Returns a new instance of Config.



7
8
9
10
11
# File 'lib/ftx/api/config.rb', line 7

def initialize(data = nil)
  data ||= {}
  @timeout = data.fetch(:timeout, 30)
  @logger = data.dig(:logger)
end

Instance Attribute Details

#loggerObject

Returns the value of attribute logger.



5
6
7
# File 'lib/ftx/api/config.rb', line 5

def logger
  @logger
end

#timeoutObject

Returns the value of attribute timeout.



5
6
7
# File 'lib/ftx/api/config.rb', line 5

def timeout
  @timeout
end