Sha256: d65e840c893a0c467ac88589a0461c3197cca3a3f95945c51012e35389b30347
Contents?: true
Size: 424 Bytes
Versions: 11
Compression:
Stored size: 424 Bytes
Contents
# frozen_string_literal: true class Money module Rails class JobArgumentSerializer < ::ActiveJob::Serializers::ObjectSerializer def serialize(money) super("value" => money.value.to_s("F"), "currency" => money.currency.iso_code) end def deserialize(hash) Money.new(hash["value"], hash["currency"]) end private def klass Money end end end end
Version data entries
11 entries across 11 versions & 1 rubygems