るりまサーチ

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

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

検索結果

Numeric#integer? -> bool (48331.0)

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

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

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

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

@see Numeric#real?...

Numeric (46404.0)

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

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

演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッド...
...ださい。


=> ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
Numeric
Integer Fixnum Bignum Float Rational Complex
-
------------------------------------------------------------------------------------------...
...| o - - - - - o
infinite? | - - - - o - -
inspect | - - o o o o o
integer?
|...
...=> ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]
Numeric
Integer Float Rational Complex
-
-------------------------------------------------------------------------------
% | o o o -...
...- - - o
imaginary | o - - - o
infinite? | o - o - o
inspect | - o o o o
integer?
|...