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,322 of 188,299
Downloads: 7,014

Daily

Ranking: 59,583 of 188,294
Downloads: 1

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,083,955,929bundler
71,240,907,761activesupport
101,190,215,327rake
29936,000,803rspec
74565,152,191pry
245185,440,432ice_nine
1,32131,527,886pry-nav
8,697400,725boolean

Owners

#GravatarHandle
1iconConvincible