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,395 of 188,757
Downloads: 7,061

Daily

Ranking: 87,276 of 188,742
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,119,417,231bundler
71,254,855,604activesupport
101,202,260,445rake
29941,173,382rspec
74569,473,215pry
245187,889,501ice_nine
1,32031,747,855pry-nav
8,677406,968boolean

Owners

#GravatarHandle
1iconConvincible