Module: I18n

Defined in:
lib/i18n/complements.rb,
lib/i18n/complements/numisma.rb,
lib/i18n/complements/version.rb,
lib/i18n/complements/numisma/currency.rb,
lib/i18n/complements/localize_extension.rb

Defined Under Namespace

Modules: Backend, Complements Classes: InvalidCurrency

Class Method Summary collapse

Class Method Details

.active_currenciesObject



100
101
102
# File 'lib/i18n/complements/numisma.rb', line 100

def active_currencies
  I18n::Complements::Numisma.active_currencies
end

.available_currenciesObject



104
105
106
# File 'lib/i18n/complements/numisma.rb', line 104

def available_currencies
  I18n::Complements::Numisma.currencies
end

.currencies(currency_code) ⇒ Object



96
97
98
# File 'lib/i18n/complements/numisma.rb', line 96

def currencies(currency_code)
  I18n::Complements::Numisma.currencies[currency_code.to_s]
end

.currencies_fileObject



120
121
122
# File 'lib/i18n/complements/numisma.rb', line 120

def currencies_file
  I18n::Complements::Numisma.currencies_file
end

.currency_label(currency_code) ⇒ Object



108
109
110
111
112
113
114
# File 'lib/i18n/complements/numisma.rb', line 108

def currency_label(currency_code)
  if currency = I18n::Complements::Numisma.currencies[currency_code.to_s]
    currency.label
  else
    return "Unknown currency: #{currency_code}"
  end
end

.currency_rate(from, to) ⇒ Object



116
117
118
# File 'lib/i18n/complements/numisma.rb', line 116

def currency_rate(from, to)
  I18n::Complements::Numisma.currency_rate(from, to)
end