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,535 of 190,317
Downloads: 7,139

Daily

Ranking: 141,213 of 190,280
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,240,425,504bundler
71,293,977,679activesupport
81,255,248,311rake
29957,358,331rspec
72583,359,451pry
244194,553,963ice_nine
1,32332,694,765pry-nav
8,575428,414boolean

Owners

#GravatarHandle
1iconConvincible