るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.009秒)
トップページ > クラス:Module[x] > クエリ:<=>[x] > バージョン:2.1.0[x]

別のキーワード

  1. _builtin <=>
  2. date <=>
  3. ipaddr <=>
  4. openssl <=>

ライブラリ

検索結果

Module#<=>(other) -> Integer | nil (54412.0)

self と 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 # =>...