Exception: Plurimath::Formatter::UnsupportedLocale

Inherits:
Error
  • Object
show all
Defined in:
lib/plurimath/errors/formatter/unsupported_locale.rb

Instance Method Summary collapse

Constructor Details

#initialize(locale, supported_locales) ⇒ UnsupportedLocale

Returns a new instance of UnsupportedLocale.



6
7
8
9
10
# File 'lib/plurimath/errors/formatter/unsupported_locale.rb', line 6

def initialize(locale, supported_locales)
  @locale = locale
  @supported = supported_locales.map(&:inspect).join(", ")
  super(message)
end

Instance Method Details

#messageObject



12
13
14
15
# File 'lib/plurimath/errors/formatter/unsupported_locale.rb', line 12

def message
  "[plurimath] Unsupported locale #{@locale.inspect}. " \
    "Supported locales are: #{@supported}."
end