Sha256: 3e9fb9c8f7806c3ec4f059fc7abfed360474b2892cafe9316be402d5f941d5e7
Contents?: true
Size: 499 Bytes
Versions: 79
Compression:
Stored size: 499 Bytes
Contents
# frozen_string_literal: true module ActiveJob module Serializers class RangeSerializer < ObjectSerializer KEYS = %w[begin end exclude_end].freeze def serialize(range) args = Arguments.serialize([range.begin, range.end, range.exclude_end?]) super(KEYS.zip(args).to_h) end def deserialize(hash) klass.new(*Arguments.deserialize(hash.values_at(*KEYS))) end private def klass ::Range end end end end
Version data entries
79 entries across 76 versions & 7 rubygems