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,400 of 198,451
Downloads: 7,669

Daily

Ranking: 52,077 of 198,429
Downloads: 1

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,944,297,318bundler
61,476,982,732activesupport
81,463,583,217rake
291,040,602,616rspec
73649,194,455pry
272212,560,343ice_nine
1,34136,059,143pry-nav
8,685498,011boolean

Owners

#GravatarHandle
1iconConvincible