るりまサーチ

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.107秒)
トップページ > クエリ:-[x] > クエリ:i[x] > クエリ:bool[x] > クエリ:is_a?[x]

別のキーワード

  1. option bool
  2. socket bool
  3. win32ole vt_bool
  4. variant vt_bool
  5. bool socket

ライブラリ

クラス

検索結果

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

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

...ジュール mod をインクルードしたクラスかそのサブクラス
のインスタンスである場合にも真を返します。
Module#includeだけではなく、Object#extendやModule#prependに
よってサブクラスのインスタンスになる場合も含みます。
上記の...
...タンスです。

//emlist[][ruby]{
module M
end
class C < Object
i
nclude 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#===,Objec...

Rake::FileList#is_a?(klass) -> bool (24402.0)

自身に Array のフリをさせます。

...自身に Array のフリをさせます。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.is_a?(Array) # => true
file_list.is_a?(String) # => false
end
//}...

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

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

...ジュール mod をインクルードしたクラスかそのサブクラス
のインスタンスである場合にも真を返します。
Module#includeだけではなく、Object#extendやModule#prependに
よってサブクラスのインスタンスになる場合も含みます。
上記の...
...タンスです。

//emlist[][ruby]{
module M
end
class C < Object
i
nclude 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#===,Objec...

Rake::FileList#kind_of?(klass) -> bool (9302.0)

自身に Array のフリをさせます。

...自身に Array のフリをさせます。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.is_a?(Array) # => true
file_list.is_a?(String) # => false
end
//}...