Module: I18n::Tasks::Command::OptionParsers::Locale::Parser
- Extended by:
- Validator
- Defined in:
- lib/i18n/tasks/command/option_parsers/locale.rb
Constant Summary
Constants included
from Validator
Validator::VALID_LOCALE_RE
Class Method Summary
collapse
Methods included from Validator
validate!
Class Method Details
.call(val, context) ⇒ Object
25
26
27
28
29
30
31
|
# File 'lib/i18n/tasks/command/option_parsers/locale.rb', line 25
def call(val, context)
if val.blank? || val == 'base'
context.base_locale
else
validate! val
end
end
|