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,492 of 189,628
Downloads: 7,099

Daily

Ranking: 111,745 of 189,601
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,191,433,711bundler
71,278,749,174activesupport
91,237,600,515rake
29950,830,885rspec
74577,896,931pry
244192,033,480ice_nine
1,32232,314,524pry-nav
8,605420,498boolean

Owners

#GravatarHandle
1iconConvincible