Class: MetalpriceAPI::Client
- Inherits:
-
Object
- Object
- MetalpriceAPI::Client
- Includes:
- Connection, Endpoints, Request
- Defined in:
- lib/metalpriceapi/client.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Endpoints
#change, #convert, #fetchHistorical, #fetchLive, #fetchSymbols, #timeframe
Methods included from Request
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
11 12 13 14 15 16 |
# File 'lib/metalpriceapi/client.rb', line 11 def initialize( = {}) MetalpriceAPI::Config::ATTRIBUTES.each do |key| send("#{key}=", [key] || MetalpriceAPI.config.send(key)) end @logger ||= MetalpriceAPI::Logger.logger end |
Class Method Details
.config ⇒ Object
23 24 25 |
# File 'lib/metalpriceapi/client.rb', line 23 def config Config end |
.configure ⇒ Object
19 20 21 |
# File 'lib/metalpriceapi/client.rb', line 19 def configure block_given? ? yield(Config) : Config end |