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,685 of 193,756
Downloads: 7,376

Daily

Ranking: 52,349 of 193,649
Downloads: 2

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,494,238,297bundler
71,367,928,484activesupport
81,345,947,699rake
29989,540,006rspec
71610,500,117pry
252202,620,945ice_nine
1,33434,048,193pry-nav
8,619466,833boolean

Owners

#GravatarHandle
1iconConvincible