Class: Exchange::ExternalAPI::Json
- Defined in:
- lib/exchange/external_api/json.rb
Overview
The json base class takes care of JSON apis. This may serve as a base for some operations which might be common to the json apis
Instance Attribute Summary
Attributes inherited from Base
#base, #cache, #helper, #rates, #timestamp
Instance Method Summary collapse
-
#initialize(*args) ⇒ Json
constructor
Initializer, essentially takes the arguments passed to initialization, loads json on the way and passes the arguments to the api base.
Methods inherited from Base
#convert, #rate, #test_for_rates_and_raise_if_nil, #to_hash!
Constructor Details
#initialize(*args) ⇒ Json
Initializer, essentially takes the arguments passed to initialization, loads json on the way and passes the arguments to the api base
16 17 18 19 |
# File 'lib/exchange/external_api/json.rb', line 16 def initialize *args Exchange::GemLoader.new('json').try_load unless defined?(JSON) super *args end |