Module: Errgonomic::OptionalDig
- Included in:
- OptionalArray, OptionalHash
- Defined in:
- lib/errgonomic/optional_dig.rb
Overview
The presence-checking walk behind OptionalHash#dig and OptionalArray#dig: every step checks key or bounds presence, so an absent path (None) stays distinct from a present nil (Some(nil)), which the core dig methods conflate. A nested wrapper handles the rest of the walk itself, by recursion. Digging into a non-collection raises, pedantically, where core dig would raise TypeError.