lib/money/bank/currencylayer.rb
# Return the rate hashkey for the given currencies.
#
# @param [Currency, String, Symbol] from The currency to exchange from.
# @param [Currency, String, Symbol] to The currency to exchange to.
#
# @return [String]
#
# @example
#   rate_key_for("USD", "CAD") #=> "USD_TO_CAD"
#   Money::Bank::Currencylayer.rates_careful = true
#   rate_key_for("USD", "CAD") #=> "USD_TO_CAD_C"
Return the rate hashkey for the given currencies.
Return the rate hashkey for the given currencies .
def rate_key_for(from, to)
        if self.class.rates_careful
          "#{Currency.wrap(from).iso_code}_TO_#{Currency.wrap(to).iso_code}_C".upcase
        else
          super
        end
      end
def rate_key_for ( from , to ) if self . class . rates_careful "#{Currency.wrap(from).iso_code}_TO_#{Currency.wrap(to).iso_code}_C" . upcase else super end end
Return the rate hashkey for the given currencies.
Return the rate hashkey for the given currencies .
None
String
from
<not_specific>
to
<not_specific>
<not_specific>
None
example
rate_key_for("USD", "CAD") #=> "USD_TO_CAD" Money::Bank::Currencylayer.rates_careful = true rate_key_for("USD", "CAD") #=> "USD_TO_CAD_C"
rate_key_for ( " USD " " CAD " ) # = > " USD_TO_CAD " Money :: Bank :: Currencylayer . rates_careful = true rate_key_for ( " USD " " CAD " ) # = > " USD_TO_CAD_C "