Class: AdLocalize::Serializers::TemplatedSerializer
- Inherits:
-
Object
- Object
- AdLocalize::Serializers::TemplatedSerializer
- Defined in:
- lib/ad_localize/serializers/templated_serializer.rb
Direct Known Subclasses
InfoPlistSerializer, LocalizableStringsSerializer, LocalizableStringsdictSerializer, PropertiesSerializer, StringsSerializer
Instance Method Summary collapse
- #configure(export_request:) ⇒ Object
-
#initialize(sanitizer:) ⇒ TemplatedSerializer
constructor
A new instance of TemplatedSerializer.
- #render(locale_wording:) ⇒ Object
Constructor Details
#initialize(sanitizer:) ⇒ TemplatedSerializer
Returns a new instance of TemplatedSerializer.
5 6 7 |
# File 'lib/ad_localize/serializers/templated_serializer.rb', line 5 def initialize(sanitizer:) @sanitizer = sanitizer end |
Instance Method Details
#configure(export_request:) ⇒ Object
16 17 18 |
# File 'lib/ad_localize/serializers/templated_serializer.rb', line 16 def configure(export_request:) # override if you need flags from export_request end |
#render(locale_wording:) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/ad_localize/serializers/templated_serializer.rb', line 9 def render(locale_wording:) variable_binding = variable_binding(locale_wording: locale_wording) return unless variable_binding render_template(template_path: template_path, variable_binding: variable_binding) end |