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,324 of 187,950
Downloads: 6,953

Daily

Ranking: 98,240 of 187,922
Downloads: 5

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,044,215,819bundler
71,225,313,097activesupport
101,176,878,843rake
28929,993,045rspec
74560,304,866pry
245183,635,234ice_nine
1,31631,190,461pry-nav
8,705395,102boolean

Owners

#GravatarHandle
1iconConvincible