Class: I18nLocaleGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- I18nLocaleGenerator
- Defined in:
- lib/generators/i18n_locale/i18n_locale_generator.rb
Instance Method Summary collapse
Instance Method Details
#main ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/generators/i18n_locale/i18n_locale_generator.rb', line 4 def main unless file_name =~ /^[a-zA-Z]{2}([-_][a-zA-Z]+)?$/ log 'ERROR: Wrong locale format. Please input in ?? or ??-?? format.' exit end generate_configuration fetch_from_rails_i18n_repository end |