跳至内容 跳至搜索
方法
D
S

常量

KEYS = %w[begin end exclude_end].freeze
 

实例公有方法

反序列化(hash)

# File activejob/lib/active_job/serializers/range_serializer.rb, line 13
def deserialize(hash)
  klass.new(*Arguments.deserialize(hash.values_at(*KEYS)))
end

序列化(range)

# 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