2件ヒット
[1-2件を表示]
(0.075秒)
ライブラリ
- ビルトイン (1)
-
rinda
/ rinda (1)
検索結果
先頭2件
-
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 オブジェク...