Sha256: 6178d6ffb47616467121ae61e6646acc89a8d815522393739b2d6089c18c6c22
Contents?: true
Size: 695 Bytes
Versions: 9
Compression:
Stored size: 695 Bytes
Contents
# frozen_string_literal: true module Decidim module TermCustomizer # This class serializes a Proposal so can be exported to CSV, JSON or other # formats. class TranslationSerializer < Decidim::Exporters::Serializer # Public: Initializes the serializer with a proposal. def initialize(translation) @translation = translation end # Public: Exports a hash with the serialized data for this proposal. def serialize { id: translation.id, locale: translation.locale, key: translation.key, value: translation.value } end private attr_reader :translation end end end
Version data entries
9 entries across 9 versions & 1 rubygems