Class: OEXRWrapper::LatestResource
- Defined in:
- lib/oexrwrapper/resources/latest.rb
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
Constructor Details
This class inherits a constructor from OEXRWrapper::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/oexrwrapper/resources/latest.rb', line 7 def method_missing(symbol, *args) if symbol !~ /^[a-zA-Z]{3}$/ super else get_request('latest').body['rates'][symbol.to_s.upcase] end end |
Instance Method Details
#respond_to_missing(symbol) ⇒ Object
15 16 17 |
# File 'lib/oexrwrapper/resources/latest.rb', line 15 def respond_to_missing symbol true end |