Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/s3crets_dig.rb
Instance Method Summary collapse
Instance Method Details
#dig(*path) ⇒ Object
2 3 4 5 6 |
# File 'lib/s3crets_dig.rb', line 2 def dig(*path) path.inject(self) do |location, key| location.respond_to?(:keys) ? location[key] : nil end end |