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,252 of 197,744
Downloads: 7,637

Daily

Ranking: 35,210 of 197,724
Downloads: 4

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,863,547,421bundler
61,458,386,728activesupport
81,444,561,272rake
291,032,112,907rspec
73642,722,902pry
269210,944,544ice_nine
1,33435,760,570pry-nav
8,672492,651boolean

Owners

#GravatarHandle
1iconConvincible