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: 108,004 of 184,790
Downloads: 6,373

Daily

Ranking: 45,146 of 184,778
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
12,629,490,221bundler
71,063,223,218activesupport
101,025,178,766rake
26854,674,154rspec
68499,577,664pry
233165,691,792ice_nine
1,30627,459,282pry-nav
8,878331,504boolean

Owners

#GravatarHandle
1iconConvincible