lib/bson/document.rb
# Retrieves the value object corresponding to the each key objects repeatedly.
# Will normalize symbol keys into strings.
# Will returns &block.call if the returned value is nil
#
# @since 1.0.0
Retrieves the value object corresponding to the each key objects repeatedly.
Will normalize symbol keys into strings.
Will returns &block.call if the returned value is nil
Retrieves the value object corresponding to the each key objects repeatedly . Will normalize symbol keys into strings . Will returns &block . call if the returned value is nil
def dig_or_get(*args, &block)
      value = self.dig *args
      if value.nil? && !block.nil?
        value = block.call
      end
      value
    end
def dig_or_get ( * args , & block ) value = self . dig * args if value . nil? && ! block . nil? value = block . call end value end
Retrieves the value object corresponding to the each key objects repeatedly.
Retrieves the value object corresponding to the each key objects repeatedly .
args
block
since
None