module I18n::Processes::Command::OptionParsers::Locale::Validator

Constants

VALID_LOCALE_RE

Public Instance Methods

validate!(locale) click to toggle source
# File lib/i18n/processes/command/option_parsers/locale.rb, line 10
def validate!(locale)
  if VALID_LOCALE_RE !~ locale
    fail CommandError, "invalid locale: #{locale}"

  end
  locale
end