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,102 of 183,107
Downloads: 6,189

Daily

Ranking: 86,038 of 183,092
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
12,407,087,911bundler
7989,475,609activesupport
10953,844,246rake
25817,849,894rspec
68466,913,746pry
231155,029,811ice_nine
1,27425,879,522pry-nav
8,927307,658boolean

Owners

#GravatarHandle
1iconConvincible