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: 107,460 of 191,455
Downloads: 7,191

Daily

Ranking: 90,780 of 191,429
Downloads: 2

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,290,634,251bundler
71,310,046,288activesupport
81,273,120,523rake
29964,231,479rspec
72588,904,024pry
1,32732,947,411pry-nav

Owners

#GravatarHandle
1iconConvincible