Class: ActiveJob::Serializers::DateSerializer

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

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from ObjectSerializer

#serialize?

Instance Method Details

#deserialize(hash) ⇒ Object



10
11
12
# File 'lib/active_job/serializers/date_serializer.rb', line 10

def deserialize(hash)
  Date.iso8601(hash["value"])
end

#serialize(date) ⇒ Object



6
7
8
# File 'lib/active_job/serializers/date_serializer.rb', line 6

def serialize(date)
  super("value" => date.iso8601)
end