Hi,
I was wondering if there is/could be a function that returns a boolean on whether or not a currency is supported by eu_central_bank. I know currently there is a function check_currency_available(currency) but that raises an exception if the currency rate doesn't exist. Can there be a function which returns false if the currency rate doesn't exist and true if it does.
def currency_available(currency)?
currency_string = currency.to_s
return true if currency_string == "EUR"
return CURRENCIES.include?(currency_string)
end
Hi, I was wondering if there is/could be a function that returns a boolean on whether or not a currency is supported by eu_central_bank. I know currently there is a function
check_currency_available(currency)
but that raises an exception if the currency rate doesn't exist. Can there be a function which returns false if the currency rate doesn't exist and true if it does.