Class: Exchange::ExternalAPI::XML
- Defined in:
- lib/exchange/external_api/xml.rb
Overview
The xml base class takes care of XML apis. It assumes you would want to use nokogiri as a parser and preloads the gem Also, this may serve as a base for some operations which might be common to the xml apis
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
#base, #cache, #helper, #rates, #timestamp
Instance Method Summary collapse
-
#initialize(*args) ⇒ XML
constructor
Initializer, essentially takes the arguments passed to initialization, loads nokogiri 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) ⇒ XML
Initializer, essentially takes the arguments passed to initialization, loads nokogiri on the way and passes the arguments to the api base
16 17 18 19 |
# File 'lib/exchange/external_api/xml.rb', line 16 def initialize *args Exchange::GemLoader.new('nokogiri').try_load unless defined?(Nokogiri) super *args end |