Class: AdLocalize::Serializers::JSONSerializer
- Inherits:
-
Object
- Object
- AdLocalize::Serializers::JSONSerializer
- Defined in:
- lib/ad_localize/serializers/json_serializer.rb
Instance Method Summary collapse
-
#initialize ⇒ JSONSerializer
constructor
A new instance of JSONSerializer.
- #render(locale_wording:) ⇒ Object
Constructor Details
#initialize ⇒ JSONSerializer
Returns a new instance of JSONSerializer.
4 5 6 |
# File 'lib/ad_localize/serializers/json_serializer.rb', line 4 def initialize @locale_wording_to_hash = Mappers::LocaleWordingToHash.new end |
Instance Method Details
#render(locale_wording:) ⇒ Object
8 9 10 |
# File 'lib/ad_localize/serializers/json_serializer.rb', line 8 def render(locale_wording:) @locale_wording_to_hash.map(locale_wording: locale_wording).to_json end |