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,805 of 195,377
Downloads: 7,468

Daily

Ranking: 60,936 of 195,357
Downloads: 2

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,589,184,664bundler
71,391,547,445activesupport
81,372,888,227rake
291,001,197,179rspec
72619,739,595pry
258204,988,978ice_nine
1,33334,546,751pry-nav
8,627474,807boolean

Owners

#GravatarHandle
1iconConvincible