744件ヒット
[1-100件を表示]
(0.088秒)
ライブラリ
- ビルトイン (660)
- bigdecimal (24)
- fiddle (24)
- openssl (24)
- zlib (12)
クラス
- Array (480)
- BigDecimal (24)
-
Fiddle
:: Pointer (24) - Integer (24)
- Numeric (12)
- Object (24)
-
OpenSSL
:: BN (24) - Random (36)
- Range (72)
- String (12)
-
Zlib
:: GzipWriter (12)
キーワード
- % (12)
- * (24)
- [] (36)
- []= (36)
- at (12)
- begin (12)
- combination (24)
- cycle (24)
-
delete
_ at (12) - end (12)
- fetch (36)
- first (48)
- flatten (12)
- flatten! (12)
- insert (12)
- last (48)
- permutation (24)
- pop (24)
-
public
_ method (12) - putc (12)
- rand (36)
-
repeated
_ combination (24) -
repeated
_ permutation (24) - rotate (12)
- rotate! (12)
- sample (48)
- shift (24)
-
to
_ i (48)
検索結果
先頭5件
-
Numeric
# to _ int -> Integer (24327.0) -
self.to_i と同じです。
...self.to_i と同じです。
//emlist[例][ruby]{
(2+0i).to_int # => 2
Rational(3).to_int # => 3
//}... -
Object
# to _ int -> Integer (24315.0) -
オブジェクトの Integer への暗黙の変換が必要なときに内部で呼ばれます。 デフォルトでは定義されていません。
...オブジェクトの Integer への暗黙の変換が必要なときに内部で呼ばれます。
デフォルトでは定義されていません。
説明のためここに記載してありますが、
このメソッドは実際には Object クラスには定義されていません。
必......が使われるすべての場面で代置可能であるような、
* 整数そのものとみなせるようなもの
という厳しいものになっています。
//emlist[][ruby]{
class Foo
def to_int
1
end
end
ary = [:a, :b, :c]
p(ary[Foo.new]) # => :b
//}
@see Kernel.#Integer... -
Fiddle
:: Pointer # to _ int -> Integer (21303.0) -
自身が指すアドレスを整数で返します。
自身が指すアドレスを整数で返します。 -
Integer
# to _ int -> self (21203.0) -
self を返します。
self を返します。
//emlist[][ruby]{
10.to_i # => 10
//} -
BigDecimal
# to _ int -> Integer (18303.0) -
self の小数点以下を切り捨てて整数に変換します。
self の小数点以下を切り捨てて整数に変換します。
@raise FloatDomainError self が無限大や NaN であった場合に発生します。 -
OpenSSL
:: BN # to _ int -> Integer (18303.0) -
自身を Integer のインスタンスに変換します。
...自身を Integer のインスタンスに変換します。
@raise OpenSSL::BNError 変換に失敗した場合に発生します... -
Fiddle
:: Pointer # to _ i -> Integer (3103.0) -
自身が指すアドレスを整数で返します。
自身が指すアドレスを整数で返します。 -
Integer
# to _ i -> self (3003.0) -
self を返します。
self を返します。
//emlist[][ruby]{
10.to_i # => 10
//} -
Random
# rand(max) -> Integer | Float (113.0) -
一様な擬似乱数を発生させます。
...様です。
このため range が Time の場合などにもうまく動作します。
引数が実数でも範囲でもない場合は Object#to_int で変換した値が指定されたものとして扱います。
@param max 乱数値の上限を正の整数または実数で指定しま...