Categories: None [Edit]

demand

https://rubygems.org/gems/demand
https://github.com/ConvincibleMedia/ruby-gem-demand
Return a variable if it's present (and optionally of the right type), otherwise a default or nil. Adds a top level demand() method, which replaces long lines of repetitive code to check for nil?/present?/empty?, etc., hard-to-read ternary operators (?:) and if statements. A block can also be specified, which only runs (with the variable) if the checks pass.

Total

Ranking: 107,533 of 192,104
Downloads: 7,259

Daily

Ranking: 60,252 of 192,085
Downloads: 3

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,340,208,428bundler
71,324,932,202activesupport
81,291,638,605rake
29970,683,748rspec
73594,715,801pry
250198,319,743ice_nine
1,32833,232,863pry-nav
8,455452,721boolean

Owners

#GravatarHandle
1iconConvincible