Class: AdLocalize::Serializers::JSONSerializer

Inherits:
Object
  • Object
show all
Defined in:
lib/ad_localize/serializers/json_serializer.rb

Instance Method Summary collapse

Constructor Details

#initializeJSONSerializer

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