Class: ActiveJob::Serializers::BigDecimalSerializer

Inherits:
ObjectSerializer show all
Defined in:
lib/active_job/serializers/big_decimal_serializer.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from ObjectSerializer

#serialize?

Instance Method Details

#deserialize(hash) ⇒ Object



12
13
14
# File 'lib/active_job/serializers/big_decimal_serializer.rb', line 12

def deserialize(hash)
  BigDecimal(hash["value"])
end

#serialize(big_decimal) ⇒ Object



8
9
10
# File 'lib/active_job/serializers/big_decimal_serializer.rb', line 8

def serialize(big_decimal)
  super("value" => big_decimal.to_s)
end