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,157 of 180,702
Downloads: 5,909

Daily

Ranking: 70,382 of 180,689
Downloads: 3

Depended by

RankDownloadsName

Depends on

RankDownloadsName
12,107,069,537bundler
7900,314,781activesupport
16863,261,344rake
24772,716,171rspec
64426,812,400pry
225141,308,895ice_nine
1,20623,947,626pry-nav
8,829284,900boolean

Owners

#GravatarHandle
1iconConvincible