Class: AdLocalize::Mappers::LocaleWordingToHash
- Inherits:
-
Object
- Object
- AdLocalize::Mappers::LocaleWordingToHash
- Defined in:
- lib/ad_localize/mappers/locale_wording_to_hash.rb
Instance Method Summary collapse
Instance Method Details
#map(locale_wording:) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/ad_localize/mappers/locale_wording_to_hash.rb', line 5 def map(locale_wording:) singulars_hash = map_singulars(simple_wordings: locale_wording.singulars.values) plural_hash = map_plurals(coumpound_wordings: locale_wording.plurals) locale_hash = singulars_hash.merge(plural_hash) { locale_wording.locale => locale_hash } end |