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,495 of 191,455
Downloads: 7,187

Daily

Ranking: 122,967 of 191,429
Downloads: 1

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,290,634,251bundler
71,310,046,288activesupport
81,273,120,523rake
29964,231,479rspec
72588,904,024pry
245196,848,875ice_nine
1,32732,947,411pry-nav
8,521440,600boolean

Owners

#GravatarHandle
1iconConvincible