RubyGems Navigation menu

demand 1.1.0

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:
= 複製 已複製

安裝:
=

版本列表:

  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.0 KB)

Runtime 相依性套件 (2):

activesupport ~> 5.2.2
boolean ~> 1.0.1

Development 相依性套件 (4):

bundler >= 1.17
pry >= 0.12
rake >= 10.0
rspec >= 3.0

擁有者:

作者:

  • Convincible

SHA 256 總和檢查碼:

1e45fe4a21c7cf0b3ef0b0b0c1871ce367a4d74cbb20470de5ab618a412363b5

總下載次數 5,989

這個版本 1,684

授權:

Ruby 版本需求: >= 0

相關連結: