Sha256: 02815be284fd10f4989ba1f156173ed216df21fcb1ee54c2aa8fde154e66497d
Contents?: true
Size: 651 Bytes
Versions: 65
Compression:
Stored size: 651 Bytes
Contents
# encoding: utf-8 require "mongoid/atomic/paths/embedded/one" require "mongoid/atomic/paths/embedded/many" module Mongoid module Atomic module Paths # Common functionality between the two different embedded paths. module Embedded attr_reader :delete_modifier, :document, :insert_modifier, :parent # Get the path to the document in the hierarchy. # # @example Get the path. # many.path # # @return [ String ] The path to the document. # # @since 2.1.0 def path @path ||= position.sub(/\.\d+$/, "") end end end end end
Version data entries
65 entries across 60 versions & 6 rubygems