Sha256: 884e396c5e416151f97dcae2e127248e16b79db2f126493732286a229321097a

Contents?: true

Size: 529 Bytes

Versions: 8

Compression:

Stored size: 529 Bytes

Contents

# encoding: utf-8
module Mongoid # :nodoc:
  module Relations #:nodoc:

    # This is the superclass for one to one relations and defines the common
    # behaviour or those proxies.
    class One < Proxy

      # Get all the documents in the relation that are loaded into memory.
      #
      # @example Get the in memory documents.
      #   relation.in_memory
      #
      # @return [ Array<Document> ] The documents in memory.
      #
      # @since 2.1.0
      def in_memory
        [ target ]
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mongoid-2.1.7 lib/mongoid/relations/one.rb
mongoid-2.1.6 lib/mongoid/relations/one.rb
mongoid-2.1.5 lib/mongoid/relations/one.rb
mongoid-2.1.4 lib/mongoid/relations/one.rb
mongoid-2.1.3 lib/mongoid/relations/one.rb
mongoid-2.1.2 lib/mongoid/relations/one.rb
mongoid-2.1.1 lib/mongoid/relations/one.rb
mongoid-2.1.0 lib/mongoid/relations/one.rb