Hash#dig is new in Ruby 2.3.0 and you should use it all the time.

My favourite usage is using it to quickly access a deeply nested value in a hash given a path (from this GOV.UK project).

path = "foo.bar.baz"
my_hash = { "foo" => { "bar" => { "baz" => "yisss" } } }
my_hash.dig(*path.split('.'))
# => "yisss"