lib/mongoid/association/embedded/embedded_in/buildable.rb
def build(base, object, type = nil)
            return object unless object.is_a?(Hash)
            if _loading?
              Factory.from_db(klass, object)
            else
              Factory.build(klass, object)
            end
          end
# This builder doesn't actually build anything, just returns the
# parent since it should already be instantiated.
#
# @example Build the document.
#   Builder.new(meta, attrs).build
#
# @param [ Object ] base The object.
# @param [ Object ] object The parent hash or document.
# @param [ String ] type Not used in this context.
#
# @return [ Document ] A single document.
This builder doesn't actually build anything, just returns the
parent since it should already be instantiated.
This builder doesn ' t actually build anything just returns the parent since it should already be instantiated .
def build(base, object, type = nil)
            return object unless object.is_a?(Hash)
            if _loading?
              Factory.from_db(klass, object)
            else
              Factory.build(klass, object)
            end
          end
def build ( base , object , type = nil ) return object unless object . is_a? ( Hash ) if _loading? Factory . from_db ( klass , object ) else Factory . build ( klass , object ) end end
This builder doesn't actually build anything, just returns the
parent since it should already be instantiated.
This builder doesn ' t actually build anything just returns the parent since it should already be instantiated .
A single document.
A single document .
 Document 
base
object
type
type Not used in this context.
type Not used in this context .
example
Build the document. Builder.new(meta, attrs).build
Build the document . Builder . new ( meta attrs ) . build