123456789_123456789_123456789_123456789_123456789_

Module: Mongoid::Atomic::Paths::Embedded

Relationships & Source Files
Namespace Children
Classes:
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/mongoid/atomic/paths/embedded.rb,
lib/mongoid/atomic/paths/embedded/many.rb,
lib/mongoid/atomic/paths/embedded/one.rb

Overview

Common functionality between the two different embedded paths.

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#delete_modifier (readonly)

[ GitHub ]

  
# File 'lib/mongoid/atomic/paths/embedded.rb', line 14

attr_reader :delete_modifier, :document, :insert_modifier, :parent

#document (readonly)

[ GitHub ]

  
# File 'lib/mongoid/atomic/paths/embedded.rb', line 14

attr_reader :delete_modifier, :document, :insert_modifier, :parent

#insert_modifier (readonly)

[ GitHub ]

  
# File 'lib/mongoid/atomic/paths/embedded.rb', line 14

attr_reader :delete_modifier, :document, :insert_modifier, :parent

#parent (readonly)

[ GitHub ]

  
# File 'lib/mongoid/atomic/paths/embedded.rb', line 14

attr_reader :delete_modifier, :document, :insert_modifier, :parent

Instance Method Details

#pathString

Get the path to the document in the hierarchy.

Examples:

Get the path.

many.path

Returns:

  • (String)

    The path to the document.

[ GitHub ]

  
# File 'lib/mongoid/atomic/paths/embedded.rb', line 22

def path
  @path ||= position.sub(/\.\d+\z/, "")
end