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,230 of 197,085
Downloads: 7,601

Daily

Ranking: 87,723 of 197,066
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,796,160,121bundler
71,443,326,435activesupport
81,428,256,062rake
291,025,379,194rspec
72637,492,173pry
263209,565,619ice_nine
1,33135,518,359pry-nav
8,653489,183boolean

Owners

#GravatarHandle
1iconConvincible