11件ヒット
[1-11件を表示]
(0.074秒)
ライブラリ
- ビルトイン (11)
検索結果
-
Module
# <=>(other) -> Integer | nil (26268.0) -
self と other の継承関係を比較します。
...は
nil を返します。
other がクラスやモジュールでなければ
nil を返します。
@param other 比較対象のクラスやモジュール
//emlist[例][ruby]{
module Foo
end
class Bar
include Foo
end
class Baz < Bar
end
class Qux
end
p Bar <=> Foo # => -1
p Baz <=> Bar......# => -1
p Baz <=> Foo # => -1
p Baz <=> Qux # => nil
p Qux <=> Baz # => nil
p Baz <=> Object.new # => nil
//}...