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,139 of 180,448
Downloads: 5,868

Daily

Ranking: 174,714 of 180,434
Downloads: 1

Depended by

RankDownloadsName

Depends on

RankDownloadsName
12,074,527,333bundler
7890,549,230activesupport
16853,130,958rake
23767,656,531rspec
63422,347,387pry
225139,913,844ice_nine
1,20323,757,961pry-nav
8,661282,025boolean

Owners

#GravatarHandle
1iconConvincible