Module: Money::LocaleBackend

Defined in:
lib/money/locale_backend/base.rb,
lib/money/locale_backend/i18n.rb,
lib/money/money/locale_backend.rb,
lib/money/locale_backend/errors.rb,
lib/money/locale_backend/legacy.rb,
lib/money/locale_backend/currency.rb

Defined Under Namespace

Classes: Base, Currency, I18n, Legacy, NotSupported, Unknown

Constant Summary collapse

BACKENDS =
{
  legacy: Money::LocaleBackend::Legacy,
  i18n: Money::LocaleBackend::I18n,
  currency: Money::LocaleBackend::Currency
}.freeze

Class Method Summary collapse

Class Method Details

.find(name) ⇒ Object

Raises:



16
17
18
19
20
# File 'lib/money/money/locale_backend.rb', line 16

def self.find(name)
  raise Unknown, "Unknown locale backend: #{name}" unless BACKENDS.key?(name)

  BACKENDS[name].new
end