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,084 of 197,051
Downloads: 7,601

Daily

Ranking: 67,605 of 197,010
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,792,501,566bundler
71,442,365,801activesupport
81,427,168,861rake
291,024,975,886rspec
72637,210,851pry
261209,500,294ice_nine
1,33035,505,629pry-nav
8,652489,075boolean

Owners

#GravatarHandle
1iconConvincible