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,562 of 192,666
Downloads: 7,304

Daily

Ranking: 60,348 of 192,588
Downloads: 7

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,389,007,605bundler
71,339,625,357activesupport
81,310,508,356rake
29976,524,168rspec
72599,796,970pry
249199,756,465ice_nine
1,32633,512,521pry-nav
8,476457,429boolean

Owners

#GravatarHandle
1iconConvincible