Method: Mongoid::Relations::Marshalable#marshal_load

Defined in:
lib/mongoid/relations/marshalable.rb

#marshal_load(data) ⇒ Array<Object>

Takes the provided data and sets it back on the proxy.

Examples:

Load the proxy.

Marshal.load(proxy)

Returns:

  • (Array<Object>)

    The loaded data.

Since:

  • 3.0.15



26
27
28
29
# File 'lib/mongoid/relations/marshalable.rb', line 26

def marshal_load(data)
  @base, @target,  = data
  extend_proxy(.extension) if .extension?
end