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.

Required Ruby Version

>= 2.5.0

Authors

Convincible

Versions

  1. 1.1.1
    1. source

      1. 1.1.1 source September 26, 2019 (5.5 KB)
  2. 1.1.0
    1. source

      1. 1.1.0 source January 16, 2019 (8.5 KB)
  3. 1.0.0
    1. source

      1. 1.0.0 source January 08, 2019 (8 KB)

Pushed by

SHA 256 checksum