Module: Nero::DigExt
- Included in:
- Config
- Defined in:
- lib/nero.rb
Instance Method Summary collapse
-
#dig!(*path) ⇒ Object
⛏️💥 Like
dig
, but raisesArgumentError
whenpath
does not exist.
Instance Method Details
#dig!(*path) ⇒ Object
⛏️💥 Like dig
, but raises ArgumentError
when path
does not exist.
26 27 28 29 30 31 32 33 |
# File 'lib/nero.rb', line 26 def dig!(k0, *k) k.unshift(k0) unless paths.include?(k) raise ArgumentError, "path not found #{k}" end dig(*k) end |