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,733 of 197,085
Downloads: 7,534

Daily

Ranking: 35,731 of 197,066
Downloads: 3

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,796,160,121bundler
71,443,326,435activesupport
81,428,256,062rake
291,025,379,194rspec
72637,492,173pry
1,33135,518,359pry-nav

Owners

#GravatarHandle
1iconConvincible