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,712 of 196,079
Downloads: 7,555

Daily

Ranking: 48,742 of 196,051
Downloads: 4

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,664,465,017bundler
71,410,868,252activesupport
81,393,380,379rake
291,010,274,160rspec
72626,559,895pry
260206,722,638ice_nine
1,33234,933,315pry-nav
8,626481,880boolean

Owners

#GravatarHandle
1iconConvincible