るりまサーチ (Ruby 3.0)

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

別のキーワード

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

ライブラリ

キーワード

検索結果

Rinda::Template (148.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...

Rational (58.0)

有理数を扱うクラスです。

有理数を扱うクラスです。

「1/3」のような有理数を扱う事ができます。Integer や Float
と同様に Rational.new ではなく、 Kernel.#Rational を使用して
Rational オブジェクトを作成します。

//emlist[例][ruby]{
Rational(1, 3) # => (1/3)
Rational('1/3') # => (1/3)
Rational('0.33') # => (33/100)
Rational.new(1, 3) # => NoMethodError
//}

Rational オブジェク...