Class: Localer::Parser
Overview
Parse translations into hash: key: translation key value: hash of locale values
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#locales ⇒ Object
readonly
Returns the value of attribute locales.
Instance Method Summary collapse
Methods inherited from Service
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
11 12 13 |
# File 'lib/localer/parser.rb', line 11 def data @data end |
#locales ⇒ Object (readonly)
Returns the value of attribute locales.
11 12 13 |
# File 'lib/localer/parser.rb', line 11 def locales @locales end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/localer/parser.rb', line 13 def call @data = {} @locales = [] @translations.each do |(locale, translation)| @locales.push locale compare(locale, translation) end self end |