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,414 of 196,721
Downloads: 7,496

Daily

Ranking: 36,893 of 196,694
Downloads: 1

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,728,237,794bundler
71,426,725,582activesupport
81,410,641,125rake
291,017,967,488rspec
72631,956,423pry
1,33135,219,219pry-nav

Owners

#GravatarHandle
1iconConvincible