Sha256: dbbb711e06bcf8a6b85c2a29e0257d815d109e482bddfc5bf39d81d093761291
Contents?: true
Size: 589 Bytes
Versions: 112
Compression:
Stored size: 589 Bytes
Contents
# frozen_string_literal: true module GraphQL module Dig # implemented using the old activesupport #dig instead of the ruby built-in # so we can use some of the magic in Schema::InputObject and Query::Arguments # to handle stringified/symbolized keys. # # @param args [Array<[String, Symbol>] Retrieves the value object corresponding to the each key objects repeatedly # @return [Object] def dig(own_key, *rest_keys) val = self[own_key] if val.nil? || rest_keys.empty? val else val.dig(*rest_keys) end end end end
Version data entries
112 entries across 112 versions & 2 rubygems