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,843 of 196,721
Downloads: 7,572

Daily

Ranking: 58,818 of 196,694
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,728,237,794bundler
71,426,725,582activesupport
81,410,641,125rake
291,017,967,488rspec
72631,956,423pry
261208,097,137ice_nine
1,33135,219,219pry-nav
8,633485,784boolean

Owners

#GravatarHandle
1iconConvincible