るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.080秒)
トップページ > クエリ:n[x] > クエリ:integer?[x]

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. openssl n=
  3. openssl n
  4. pop n_mails
  5. pop n_bytes

ライブラリ

クラス

検索結果

Integer#integer? -> true (27213.0)

常に真を返します。

...常に真を返します。

//emlist[][ruby]{
1.integer? # => true
1.0.integer? # => false
//}...

Numeric#integer? -> bool (24213.0)

自身が Integer かそのサブクラスのインスタンスの場合にtrue を返し ます。そうでない場合に false を返します。

...Integer かそのサブクラスのインスタンスの場合にtrue を返し
ます。そうでない場合に false を返します。

N
umeric のサブクラスは、このメソッドを適切に再定義しなければなりません。

//emlist[例][ruby]{
(1.0).integer? #=> false
(1).int...
...eger? #=> true
//}

@see Numeric#real?...

Numeric (6042.0)

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

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

演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッ...
...で提供されているメソッド
(+, -, *, /, %) を利用して定義されるものがほとんどです。
つまり Numeric で定義されているメソッドは、Numeric のサブクラスとして新たに数値クラスを定義した時に、
演算メソッド(+, -, *, /, %, <=>, coe...
...inary | o - - - - - o
infinite? | - - - - o - -
inspect | - - o o o o o
integer?
...
...o
imaginary | o - - - o
infinite? | o - o - o
inspect | - o o o o
integer?
| o o -...