Class: Weatherman::I18N

Inherits:
Object
  • Object
show all
Defined in:
lib/yahoo_weatherman/i18n.rb

Constant Summary collapse

I18N_YAML_DIR =
File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'i18n'))
LANGUAGES =
{}

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#languageObject

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