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: 108,093 of 183,477
Downloads: 6,234

Daily

Ranking: 41,916 of 183,470
Downloads: 1

Depended by

RankDownloadsName

Depends on

RankDownloadsName
12,456,134,847bundler
71,004,546,968activesupport
10969,073,546rake
25825,073,950rspec
69473,435,718pry
231157,240,469ice_nine
1,28326,215,377pry-nav
8,908312,502boolean

Owners

#GravatarHandle
1iconConvincible