class ExchangeRate::CurrencyRate
A currency/rate/date tuple. Represents the value of the currency on a specific date, in Euro Examples
CurrencyRate.new(currency = 'GBP', value_in_euro = 0.001, date_of_rate = Date.parse('2019-03-30'))
Attributes
currency[W]
The currency short-code String
value_in_euro[W]
The value of one unit of the currency in Euro
Public Instance Methods
validate()
click to toggle source
:attr_writer: date_of_rate The effective date of this FX rate for the currency
Calls superclass method
# File lib/exchange_rate/currency_rate.rb, line 29 def validate super validates_presence %i[currency value_in_euro date_of_rate] end