class Roda::RodaPlugins::TypecastParams::Params

def dig(type, *nest, key)

tp.dig(:array, :pos_int, 'foo', 'bar', 'baz') # tp['foo']['bar'].array(:int, 'baz')

the first argument and providing the type in the second argument:
You can use +dig+ to get access to nested arrays by using :array or :array! as

in an object that is not an array or hash, then raises an Error.
Returns nil if any of the values are not present or not the expected type. If the nest path results

tp.dig(:pos_int, 'foo', 'bar', 'baz') # tp['foo']['bar'].pos_int('baz')
tp.dig(:pos_int, 'foo', 'bar') # tp['foo'].pos_int('bar')
tp.dig(:pos_int, 'foo') # tp.pos_int('foo')

+key+ on that object using +type+:
Convert values nested under the current obj. Traverses the current object using +nest+, then converts
def dig(type, *nest, key)
  _dig(false, type, nest, key)
end