Class: Weatherman::I18N
- Inherits:
-
Object
- Object
- Weatherman::I18N
- Defined in:
- lib/yahoo_weatherman/i18n.rb
Constant Summary collapse
- I18N_YAML_DIR =
File.(File.join(File.dirname(__FILE__), '..', '..', 'i18n'))
- LANGUAGES =
{}
Instance Attribute Summary collapse
-
#language ⇒ Object
Returns the value of attribute language.
Instance Method Summary collapse
-
#initialize(language) ⇒ I18N
constructor
A new instance of I18N.
- #translate!(attributes) ⇒ Object
Constructor Details
#initialize(language) ⇒ I18N
Returns a new instance of I18N.
10 11 12 |
# File 'lib/yahoo_weatherman/i18n.rb', line 10 def initialize(language) @language = language end |
Instance Attribute Details
#language ⇒ Object
Returns the value of attribute language.
8 9 10 |
# File 'lib/yahoo_weatherman/i18n.rb', line 8 def language @language end |
Instance Method Details
#translate!(attributes) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/yahoo_weatherman/i18n.rb', line 14 def translate!(attributes) if i18n? translate_text! attributes translate_days! attributes translate_locations! attributes end attributes end |