BETAmodules.com is in beta — open to partnerships & joint ventures.Build with us

demand

v1.1.1RubyGems· Ruby

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.

The verdict
Abandoned. Last published 6 years ago. No recent activity — look for a maintained alternative.
No recent activity — look for a maintained alternative.
Live from the RubyGems registry · derived rules, not AI
How it scores
MaintenanceAbandoned
PopularityNiche
SecurityClean
LicenseUnknown
DepsZero deps
Maintenance
Last published 6 years ago.
Popularity
10 downloads / week
Security
No known advisories for this version (OSV).
License
No license declared.
Dependencies
No runtime dependencies
Recent releases
  • 1.1.16 years ago
  • 1.1.07 years ago
  • 1.0.07 years ago
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. (Ruby / RubyGems) · Modules