るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.036秒)
トップページ > クエリ:FALSE[x] > クエリ:NIL[x] > クエリ:TRUE[x] > クエリ:String[x] > ライブラリ:rinda/rinda[x]

別のキーワード

  1. _builtin nil?
  2. nilclass nil?
  3. object nil?
  4. _builtin nil
  5. object nil

検索結果

Rinda::Template (98.0)

タプルのマッチングのためのクラスです。 ユーザがこのクラスを直接使うことはありません。

...e 'rinda/rinda'

template = Rinda::Template.new(['abc', nil, nil])
template.match(['abc', 2, 5]) # => true
template.match(['hoge', 2, 5]) # => false

template = Rinda::Template.new([String, Integer, nil])
template.match(['abc', 2, 5]) # => true
template.match(['abcd', 2, 5]) # => true...
...er, nil])
template.match([/^abc/, Integer, nil]) # => true
template.match(['abc', 2, 5]) # => true
template.match(['def', 2, 5]) # => false

template = Rinda::Template.new({'name' => String, 'age' => Integer})
template.match({'name' => 'seki', 'age' => 0x20}) # => true...
...template.match({'name' => :seki, 'age' => 0x20}) # => false...