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,279 of 187,548
Downloads: 6,896

Daily

Ranking: 108,010 of 187,532
Downloads: 1

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,007,742,320bundler
71,210,718,693activesupport
101,164,433,060rake
28924,538,466rspec
73555,825,210pry
243182,375,642ice_nine
1,31830,829,428pry-nav
8,724389,086boolean

Owners

#GravatarHandle
1iconConvincible