RubyGems Navigation menu

demand 1.0.0

Adds a top level demand(variable) method to return a variable if it's present and optionally of the right type. Otherwise, a default or nil is returned. demand() 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.5KB)
  2. 1.1.0 - January 16, 2019 (8.5KB)
  3. 1.0.0 - January 08, 2019 (8KB)

Runtime依存関係 (2):

boolean ~> 1.0
facets ~> 3.1

Development依存関係 (4):

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

所有者:

作者:

  • Convincible

SHA 256チェックサム:

= クリップボードにコピー コピー完了!

累計ダウンロード数 6,010

このバージョンのみ 1,634

ライセンス:

N/A

必要なRubyのバージョン: >= 0

リンク: