Categories: None [Edit]

key_dial

https://rubygems.org/gems/key_dial
https://github.com/ConvincibleMedia/ruby-gem-key_dial
Avoid all errors when accessing (deeply nested) Hash, Array or Struct keys. Safer than dig(), as will quietly return nil (or your default) if the keys requested are invalid for any reason at all. Bonus: you don't even need to fiddle with existing code. If you have already written something to access a deep key (e.g. hash[:a][:b][:c]), just surround this with '.dial' and '.call'.

Total

Ranking: 108,739 of 198,451
Downloads: 7,619

Daily

Ranking: 40,721 of 198,429
Downloads: 2

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,944,297,318bundler
61,476,982,732activesupport
81,463,583,217rake
291,040,602,616rspec
73649,194,455pry
1,34136,059,143pry-nav

Owners

#GravatarHandle
1iconConvincible