755件ヒット
[1-100件を表示]
(0.099秒)
ライブラリ
- ビルトイン (564)
- bigdecimal (22)
- fiddle (44)
- openssl (22)
- zlib (11)
クラス
- Array (319)
- BigDecimal (22)
-
Fiddle
:: Pointer (44) - Integer (25)
- Numeric (11)
- Object (22)
-
OpenSSL
:: BN (22) - Random (22)
- Range (33)
- SignalException (33)
- String (11)
-
Zlib
:: GzipWriter (11)
モジュール
- Kernel (77)
キーワード
- % (11)
- * (22)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - Integer (11)
-
NEWS for Ruby 3
. 0 . 0 (4) - NUM2INT (11)
- NUM2UINT (11)
- NUM2ULONG (11)
- NUM2USHORT (11)
- Numeric (11)
- [] (44)
- at (11)
- begin (11)
- combination (22)
- cycle (22)
-
delete
_ at (11) - fetch (11)
- first (44)
- flatten (11)
- flatten! (11)
- format (11)
- insert (11)
- last (11)
- new (33)
- permutation (22)
- pop (11)
-
public
_ method (11) - putc (11)
- rand (44)
-
rb
_ to _ int (11) -
rb
_ to _ integer (11) -
repeated
_ combination (22) -
repeated
_ permutation (22) - sample (22)
- shift (22)
- sprintf (11)
- sprintf フォーマット (11)
- srand (22)
-
to
_ i (44) -
to
_ ptr (11) -
try
_ convert (3)
検索結果
先頭5件
-
Integer
# to _ int -> self (41208.0) -
self を返します。
...self を返します。
//emlist[][ruby]{
10.to_i # => 10
//}... -
Integer
# to _ i -> self (26108.0) -
self を返します。
...self を返します。
//emlist[][ruby]{
10.to_i # => 10
//}... -
Numeric
# to _ int -> Integer (24335.0) -
self.to_i と同じです。
...self.to_i と同じです。
//emlist[例][ruby]{
(2+0i).to_int # => 2
Rational(3).to_int # => 3
//}... -
Object
# to _ int -> Integer (24307.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... -
Integer
. try _ convert(obj) -> Integer | nil (23128.0) -
obj を Integer に変換しようと試みます。変換には Object#to_int メソッドが使われます。
...obj を Integer に変換しようと試みます。変換には Object#to_int
メソッドが使われます。
Integer ならそのままobjを返します。
そうでなければ obj.to_int の結果を返すか、nil が返されます。
@param obj 変換する任意のオブジェクト......@return Integer または nil
@raise TypeError to_int が Integer を返さなかった場合に発生します。
//emlist[例][ruby]{
Integer.try_convert(1) # => 1
Integer.try_convert(1.25) # => 1
Integer.try_convert([]) # => nil
//}... -
BigDecimal
# to _ int -> Integer (21302.0) -
self の小数点以下を切り捨てて整数に変換します。
...self の小数点以下を切り捨てて整数に変換します。
@raise FloatDomainError self が無限大や NaN であった場合に発生します。... -
Fiddle
:: Pointer # to _ int -> Integer (21302.0) -
自身が指すアドレスを整数で返します。
自身が指すアドレスを整数で返します。 -
OpenSSL
:: BN # to _ int -> Integer (21302.0) -
自身を Integer のインスタンスに変換します。
...自身を Integer のインスタンスに変換します。
@raise OpenSSL::BNError 変換に失敗した場合に発生します... -
VALUE rb
_ to _ int(VALUE val) (12216.0) -
val を to_int メソッドを使って Ruby の整数に変換します。
...val を to_int メソッドを使って Ruby の整数に変換します。... -
static VALUE rb
_ to _ integer(VALUE val , char *method) (12200.0) -