るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.019秒)
トップページ > バージョン:2.6.0[x] > クエリ:numeric[x] > クエリ:integer?[x] > 種類:インスタンスメソッド[x]

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric nonzero?
  4. numeric real?

ライブラリ

クラス

検索結果

Numeric#integer? -> bool (81379.0)

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

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

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

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

@see Numeric#real?