Class: FixerApiClient::Currency
- Inherits:
-
Object
- Object
- FixerApiClient::Currency
- Defined in:
- lib/fixer_api_client/currency.rb
Constant Summary collapse
- BASE_CURRENCY =
'EUR'
- BASE_CURRENCY_AMOUNT =
1
Instance Attribute Summary collapse
-
#friendly_name ⇒ Object
readonly
Returns the value of attribute friendly_name.
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, symbol, friendly_name) ⇒ Currency
constructor
A new instance of Currency.
- #inspect ⇒ Object
Constructor Details
#initialize(value, symbol, friendly_name) ⇒ Currency
Returns a new instance of Currency.
8 9 10 11 12 13 |
# File 'lib/fixer_api_client/currency.rb', line 8 def initialize(value, symbol, friendly_name) @value = value @symbol = symbol @friendly_name = friendly_name end |
Instance Attribute Details
#friendly_name ⇒ Object (readonly)
Returns the value of attribute friendly_name.
6 7 8 |
# File 'lib/fixer_api_client/currency.rb', line 6 def friendly_name @friendly_name end |
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
6 7 8 |
# File 'lib/fixer_api_client/currency.rb', line 6 def symbol @symbol end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
6 7 8 |
# File 'lib/fixer_api_client/currency.rb', line 6 def value @value end |
Instance Method Details
#inspect ⇒ Object
15 16 17 |
# File 'lib/fixer_api_client/currency.rb', line 15 def inspect "#{value} #{friendly_name}" end |