ruby has get-in, but it's called dig!
Ever miss that sweet functional language feature when you're in ruby?
(get-in {:a [{:b 2}]} [:a 0 :b])
=> 2
Well, if you're on ruby >= 2.3, you can!
{a: [b: 2]}.dig(:a, 0, :b)
=> 2
Tweet