るりまサーチ (Ruby 2.1.0)

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

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer downto
  5. integer times

ライブラリ

検索結果

Integer (114058.0)

整数クラスです。

整数クラスです。

整数オブジェクトに特異メソッドを追加する事はできません。追加した場合、
TypeError が発生します。

2.4.0 から Fixnum, Bignum は Integerに統合されました。
2.4.0 からはどちらも Integer クラスのエイリアスとなっています。

Fixnum (114052.0)

Alias of Integer

Alias of Integer

Numeric (394.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

...d
//}

また、任意桁の切上げ、切捨て、四捨五入を行うメソッドは以下のように
定義できます。

//emlist[][ruby]{
class
Numeric
def roundup(d=0)
x = 10**d
if self > 0
self.quo(x).ceil * x
else
self.quo(x).floor * x
end
end

def roun...