Sha256: c70aa0a763a12dd3dacf92b4f87ccda611ce5ea58cb9a0b312723560fb72d8cf

Contents?: true

Size: 351 Bytes

Versions: 22

Compression:

Stored size: 351 Bytes

Contents

# frozen_string_literal: true

module ActiveJob
  module Serializers
    class TimeSerializer < ObjectSerializer # :nodoc:
      def serialize(time)
        super("value" => time.iso8601)
      end

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

      private
        def klass
          Time
        end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
activejob-6.0.6.1 lib/active_job/serializers/time_serializer.rb
activejob-6.0.6 lib/active_job/serializers/time_serializer.rb
activejob-6.0.5.1 lib/active_job/serializers/time_serializer.rb
activejob-6.0.5 lib/active_job/serializers/time_serializer.rb
activejob-6.0.4.8 lib/active_job/serializers/time_serializer.rb
activejob-6.0.4.7 lib/active_job/serializers/time_serializer.rb
activejob-6.0.4.6 lib/active_job/serializers/time_serializer.rb
activejob-6.0.4.5 lib/active_job/serializers/time_serializer.rb
activejob-6.0.4.4 lib/active_job/serializers/time_serializer.rb
activejob-6.0.4.3 lib/active_job/serializers/time_serializer.rb
activejob-6.0.4.2 lib/active_job/serializers/time_serializer.rb
activejob-6.0.4.1 lib/active_job/serializers/time_serializer.rb
activejob-6.0.4 lib/active_job/serializers/time_serializer.rb
activejob-6.0.3.7 lib/active_job/serializers/time_serializer.rb
activejob-6.0.3.6 lib/active_job/serializers/time_serializer.rb
activejob-6.0.3.5 lib/active_job/serializers/time_serializer.rb
activejob-6.0.3.4 lib/active_job/serializers/time_serializer.rb
activejob-6.0.3.3 lib/active_job/serializers/time_serializer.rb
activejob-6.0.3.2 lib/active_job/serializers/time_serializer.rb
activejob-6.0.3.1 lib/active_job/serializers/time_serializer.rb