Sha256: 3739e31fb40dfb5c07cef119b85c6e6ee151e7224de0acdbb22a3768d0b6b5ca
Contents?: true
Size: 632 Bytes
Versions: 29
Compression:
Stored size: 632 Bytes
Contents
# frozen_string_literal: true 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. def path @path ||= position.sub(/\.\d+\z/, "") end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems