Sha256: 6b768346d08256f6063b7d334ba92b1feaebe9e7ba1466d6035f944680efc7cc
Contents?: true
Size: 811 Bytes
Versions: 24
Compression:
Stored size: 811 Bytes
Contents
# frozen_string_literal: true module Mongoid module Association module Marshalable # Provides the data needed to Marshal.dump an association proxy. # # @example Dump the proxy. # Marshal.dump(proxy) # # @return [ Array<Object> ] The dumped data. def marshal_dump [ _base, _target, _association ] end # Takes the provided data and sets it back on the proxy. # # @example Load the proxy. # Marshal.load(proxy) # # @param [ Array<Object> ] data The data to set on the proxy. # # @return [ Array<Object> ] The loaded data. def marshal_load(data) @_base, @_target, @_association = data extend_proxy(_association.extension) if _association.extension end end end end
Version data entries
24 entries across 24 versions & 1 rubygems