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,541 of 186,995
Downloads: 6,646

Daily

Ranking: 89,853 of 186,959
Downloads: 5

Depended by

RankDownloadsName

Depends on

RankDownloadsName
12,908,242,014bundler
71,169,578,855activesupport
101,129,028,222rake
27909,782,048rspec
71543,136,562pry
239178,849,040ice_nine
1,32330,005,636pry-nav
8,778370,710boolean

Owners

#GravatarHandle
1iconConvincible