class AdLocalize::Serializers::PropertiesSerializer
Public Class Methods
new()
click to toggle source
# File lib/ad_localize/serializers/properties_serializer.rb, line 6 def initialize @translation_mapper = Mappers::TranslationMapper.new end
Private Instance Methods
hash_binding(locale_wording:)
click to toggle source
# File lib/ad_localize/serializers/properties_serializer.rb, line 16 def hash_binding(locale_wording:) { translations: map_translations(translations: locale_wording.singulars) } end
map_translations(translations:)
click to toggle source
# File lib/ad_localize/serializers/properties_serializer.rb, line 20 def map_translations(translations:) translations.map { |translation| @translation_mapper.map(translation: translation) } end
template_path()
click to toggle source
# File lib/ad_localize/serializers/properties_serializer.rb, line 12 def template_path TEMPLATES_DIRECTORY + "/properties/template.properties.erb" end