Class: FTX::API::Config
- Inherits:
-
Object
- Object
- FTX::API::Config
- Defined in:
- lib/ftx/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.
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
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/ftx/api/config.rb', line 5 def logger @logger end |
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/ftx/api/config.rb', line 5 def timeout @timeout end |