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,580 of 193,214
Downloads: 7,355

Daily

Ranking: 94,007 of 193,188
Downloads: 1

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,441,039,624bundler
71,354,414,585activesupport
81,330,047,653rake
29983,045,376rspec
72605,239,366pry
251201,214,482ice_nine
1,33133,773,396pry-nav
8,487461,966boolean

Owners

#GravatarHandle
1iconConvincible