RubyGems Navigation menu

demand 1.1.1

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.

Gemfile:
= Copiar al portapapeles ¡Copiado!

instalar:
=

Versiones:

  1. 1.1.1 - September 26, 2019 (5,5 KB)
  2. 1.1.0 - January 16, 2019 (8,5 KB)
  3. 1.0.0 - January 08, 2019 (8 KB)

dependencias de Runtime (1):

boolean ~> 1.0

dependencias de Development (7):

bundler ~> 2.0
ice_nine >= 0
pry >= 0
pry-nav >= 0
rake ~> 12.0
rspec ~> 3.0

Propietarios:

Subida por:

Autores:

  • Convincible

SHA 256 checksum:

11dd43525f41feac43e3bf9dbd919caeddb90164a1f488b25b0dfaad929d9028

Total de descargas 5.878

Para esta versión 2.631

Licencias:

N/A

Versión de Ruby requerida: >= 2.5.0

Enlace: