Module: Mongoid::Atomic::Paths::Embedded
- Defined in:
- lib/mongoid/atomic/paths/embedded.rb,
lib/mongoid/atomic/paths/embedded/one.rb,
lib/mongoid/atomic/paths/embedded/many.rb
Overview
Common functionality between the two different embedded paths.
Defined Under Namespace
Instance Attribute Summary collapse
-
#delete_modifier ⇒ Object
readonly
Returns the value of attribute delete_modifier.
-
#document ⇒ Object
readonly
Returns the value of attribute document.
-
#insert_modifier ⇒ Object
readonly
Returns the value of attribute insert_modifier.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
-
#path ⇒ String
Get the path to the document in the hierarchy.
Instance Attribute Details
#delete_modifier ⇒ Object (readonly)
Returns the value of attribute delete_modifier.
14 15 16 |
# File 'lib/mongoid/atomic/paths/embedded.rb', line 14 def delete_modifier @delete_modifier end |
#document ⇒ Object (readonly)
Returns the value of attribute document.
14 15 16 |
# File 'lib/mongoid/atomic/paths/embedded.rb', line 14 def document @document end |
#insert_modifier ⇒ Object (readonly)
Returns the value of attribute insert_modifier.
14 15 16 |
# File 'lib/mongoid/atomic/paths/embedded.rb', line 14 def insert_modifier @insert_modifier end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
14 15 16 |
# File 'lib/mongoid/atomic/paths/embedded.rb', line 14 def parent @parent end |
Instance Method Details
#path ⇒ String
Get the path to the document in the hierarchy.
22 23 24 |
# File 'lib/mongoid/atomic/paths/embedded.rb', line 22 def path @path ||= position.sub(/\.\d+\z/, "") end |