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,198 of 187,224
Downloads: 6,852

Daily

Ranking: 71,446 of 187,196
Downloads: 10

Depended by

RankDownloadsName

Depends on

RankDownloadsName
12,971,947,338bundler
71,195,631,968activesupport
101,151,463,039rake
27919,195,736rspec
73551,385,293pry
241181,166,527ice_nine
1,31630,562,520pry-nav
8,726383,865boolean

Owners

#GravatarHandle
1iconConvincible