るりまサーチ

最速Rubyリファレンスマニュアル検索!
133件ヒット [101-133件を表示] (0.093秒)

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

<< < 1 2 >>

Module#>=(other) -> bool | nil (137.0)

比較演算子。self が other の先祖か同一クラスである場合、 true を返します。 self が other の子孫である場合、false を返します。

...nil を返します。

@
param other 比較対象のモジュールやクラス

@
raise TypeError other がクラスやモジュールではない場合に発生します。

@
see Module#<

//emlist[例][ruby]{
module Foo; end
module Bar
include Foo
end
module Baz
prepend
Foo
end

Bar.ancestors...

Object#is_a?(mod) -> bool (131.0)

オブジェクトが指定されたクラス mod かそのサブクラスのインスタンスであるとき真を返します。

...やModule#prepend
よってサブクラスのインスタンスになる場合も含みます。
上記のいずれでもない場合に false を返します。

@
param mod クラスやモジュールなど、Moduleかそのサブクラスのインスタンスです。

//emlist[][ruby]{
module...
...M
end
class C < Object
include M
end
class S < C
end

obj = S.new
p obj.is_a?(S) # true
p obj.is_a?(C) # true
p obj.is_a?(Object) # true
p obj.is_a?(M) # true
p obj.is_a?(Hash) # false
//}

@
see Object#instance_of?,Module#===,Object#class...

Object#kind_of?(mod) -> bool (131.0)

オブジェクトが指定されたクラス mod かそのサブクラスのインスタンスであるとき真を返します。

...やModule#prepend
よってサブクラスのインスタンスになる場合も含みます。
上記のいずれでもない場合に false を返します。

@
param mod クラスやモジュールなど、Moduleかそのサブクラスのインスタンスです。

//emlist[][ruby]{
module...
...M
end
class C < Object
include M
end
class S < C
end

obj = S.new
p obj.is_a?(S) # true
p obj.is_a?(C) # true
p obj.is_a?(Object) # true
p obj.is_a?(M) # true
p obj.is_a?(Hash) # false
//}

@
see Object#instance_of?,Module#===,Object#class...
<< < 1 2 >>