Skip to Content Skip to Search

class ActiveJob::Serializers::RangeSerializer

Inherits From

Constants

%w[begin end exclude_end].freeze

Public instance methods

Source code GitHub
# File activejob/lib/active_job/serializers/range_serializer.rb, line 13
def deserialize(hash)
  klass.new(*Arguments.deserialize(hash.values_at(*KEYS)))
end
Source code GitHub
# File activejob/lib/active_job/serializers/range_serializer.rb, line 8
def serialize(range)
  args = Arguments.serialize([range.begin, range.end, range.exclude_end?])
  super(KEYS.zip(args).to_h)
end

Definition files