Class: I18nFactory::Generators::UpdateGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- I18nFactory::Generators::UpdateGenerator
- Defined in:
- lib/generators/update_generator.rb
Instance Attribute Summary collapse
-
#current_locale ⇒ Object
Returns the value of attribute current_locale.
-
#defined_columns ⇒ Object
Returns the value of attribute defined_columns.
-
#defined_model_name_human ⇒ Object
Returns the value of attribute defined_model_name_human.
Instance Method Summary collapse
Instance Attribute Details
#current_locale ⇒ Object
Returns the value of attribute current_locale.
8 9 10 |
# File 'lib/generators/update_generator.rb', line 8 def current_locale @current_locale end |
#defined_columns ⇒ Object
Returns the value of attribute defined_columns.
8 9 10 |
# File 'lib/generators/update_generator.rb', line 8 def defined_columns @defined_columns end |
#defined_model_name_human ⇒ Object
Returns the value of attribute defined_model_name_human.
8 9 10 |
# File 'lib/generators/update_generator.rb', line 8 def defined_model_name_human @defined_model_name_human end |
Instance Method Details
#update_i18_file ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/generators/update_generator.rb', line 15 def update_i18_file I18nFactory::Locale.all.each do |locale| self.current_locale = locale load_yaml_on(locale) if complex? template 'plain.yml.erb', path_for_i18n(locale), force: true else template 'i18n.yml.erb', path_for_i18n(locale), force: true end end end |