るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.017秒)

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer chr
  5. integer new

検索結果

Rinda::Template (27.0)

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

...ことはありません。

=== 例

require '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...
...= Rinda::Template.new([/^abc/, Integer, 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' =>...