class NilClass
クラスの継承リスト: NilClass < Object < Kernel < BasicObject
要約
nil のクラス。 nil は NilClass クラスの唯一のインスタンスです。 nil は false オブジェクトとともに偽を表し、 その他の全てのオブジェクトは真です。
インスタンスメソッド
self & other -> false-
常に false を返します。
- [PARAM] other:
- 論理積を行なう式です
self ^ other -> bool-
other が真なら true を, 偽なら false を返します。
- [PARAM] other:
- 排他的論理和を行なう式です
nil? -> bool-
常に true を返します。
rationalize -> Rationalrationalize(eps) -> Rational-
0/1 を返します。
- [PARAM] eps:
- 許容する誤差
引数 eps は常に無視されます。
例:
nil.rationalize # => (0/1) nil.rationalize(100) # => (0/1) nil.rationalize(0.1) # => (0/1)
to_a -> Array-
空配列 [] を返します。
to_c -> Complex-
0+0i を返します。
例:
nil.to_c # => (0+0i)
to_f -> Float-
0.0 を返します。
to_i -> Fixnum-
0 を返します。
to_r -> Rational-
0/1 を返します。
例:
nil.to_r # => (0/1)
to_s -> String-
空文字列 "" を返します。
self | other -> bool-
other が真なら true を, 偽なら false を返します。
- [PARAM] other:
- 論理和を行なう式です
class NilClass