Sha256: 44c5119c7e770a7783627850630c6db1353d2ac118786bb2734a2fa1af797eec
Contents?: true
Size: 744 Bytes
Versions: 38
Compression:
Stored size: 744 Bytes
Contents
# frozen_string_literal: true module Decidim module Votings module Census # This class serializes a Voting::Census::Datum class DatumSerializer < Decidim::Exporters::Serializer include Decidim::ApplicationHelper # Public: Initializes the serializer with a Voting::Census::Datum. def initialize(datum) @datum = datum end # Public: Exports a hash with the serialized data for this datum. def serialize { full_name: datum.full_name, full_address: datum.full_address, postal_code: datum.postal_code, access_code: datum.access_code } end attr_reader :datum end end end end
Version data entries
38 entries across 38 versions & 1 rubygems