Sha256: 5d36f38814d3f403362d1ddd3c1b1278b19af59bf8cd2d9fb676e884637c7383
Contents?: true
Size: 889 Bytes
Versions: 27
Compression:
Stored size: 889 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 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. # # @since 3.0.15 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. # # @since 3.0.15 def marshal_load(data) @_base, @_target, @_association = data extend_proxy(_association.extension) if _association.extension end end end end
Version data entries
27 entries across 27 versions & 2 rubygems