Class: ForexRateAPI::Client
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Endpoints
#change, #convert, #fetchHistorical, #fetchLive, #fetchSymbols, #ohlc, #timeframe, #usage
Methods included from Request
#delete, #get, #post, #put
Constructor Details
#initialize(options = {}) ⇒ Client
11
12
13
14
15
16
|
# File 'lib/forexrateapi/client.rb', line 11
def initialize(options = {})
ForexRateAPI::Config::ATTRIBUTES.each do |key|
send("#{key}=", options[key] || ForexRateAPI.config.send(key))
end
@logger ||= ForexRateAPI::Logger.logger
end
|
Class Method Details
.config ⇒ Object
23
24
25
|
# File 'lib/forexrateapi/client.rb', line 23
def config
Config
end
|
19
20
21
|
# File 'lib/forexrateapi/client.rb', line 19
def configure
block_given? ? yield(Config) : Config
end
|