Sha256: 22f79a77ba2f8fdee83c00690f70689998b8f487033040b77c1f7927d95daf87
Contents?: true
Size: 683 Bytes
Versions: 27
Compression:
Stored size: 683 Bytes
Contents
# frozen_string_literal: true # 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+\z/, "") end end end end end
Version data entries
27 entries across 27 versions & 2 rubygems