Ruby 1.9.3 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > Numericクラス > real?

instance method Numeric#real?

real? -> bool

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

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

class Numeric