Class: CurrencyLayerApi::Conversion
- Inherits:
-
Object
- Object
- CurrencyLayerApi::Conversion
- Defined in:
- lib/currency_layer_api/conversion.rb
Overview
Conversion Class for CurrencyLayerApi
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#from_code ⇒ Object
readonly
Returns the value of attribute from_code.
-
#to_code ⇒ Object
readonly
Returns the value of attribute to_code.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(from_code:, to_code:, value:, date: nil) ⇒ Conversion
constructor
A new instance of Conversion.
Constructor Details
#initialize(from_code:, to_code:, value:, date: nil) ⇒ Conversion
Returns a new instance of Conversion.
8 9 10 11 12 13 |
# File 'lib/currency_layer_api/conversion.rb', line 8 def initialize(from_code:, to_code:, value:, date: nil) @from_code = from_code @to_code = to_code @value = value @date = date end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
6 7 8 |
# File 'lib/currency_layer_api/conversion.rb', line 6 def date @date end |
#from_code ⇒ Object (readonly)
Returns the value of attribute from_code.
6 7 8 |
# File 'lib/currency_layer_api/conversion.rb', line 6 def from_code @from_code end |
#to_code ⇒ Object (readonly)
Returns the value of attribute to_code.
6 7 8 |
# File 'lib/currency_layer_api/conversion.rb', line 6 def to_code @to_code end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
6 7 8 |
# File 'lib/currency_layer_api/conversion.rb', line 6 def value @value end |