るりまサーチ

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

別のキーワード

  1. object is_a?
  2. rake is_a?
  3. filelist is_a?
  4. _builtin is_a?
  5. socket cmsg_is?

ライブラリ

クラス

キーワード

検索結果

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

オブジェクトが指定されたクラス 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 (24206.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 (9118.0)

オブジェクトが指定されたクラス 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 (9106.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

//}...

Ruby用語集 (64.0)

Ruby用語集 A B C D E F G I J M N O R S Y

...Ruby用語集
A B C D E F G I J M N O R S Y

a ka sa ta na ha ma ya ra wa

=== 記号・数字
: %記法
: % notation
「%」記号で始まる多種多様なリテラル記法の総称。

参照:d:spec/literal#percent

: 0 オリジン
: zero-ba...
... Implementation)とも呼ばれる。

: Crystal
Ruby によく似たオブジェクト指向プログラミング言語。
型推論を持った静的型付け言語であり、処理系はコンパイラーである。

https://ja.crystal-lang.org/

: CSI 方式
CSI は Code Set Independ...
...[a:I] I

: irb
組込みの対話型 Ruby 実行環境およびそのコマンド名。

i
rb コマンドで起動し、Ruby の式を入力すればその場で評価して結果を表示する。
名称は interactive Ruby から。

参照:irb

: is-a 関係
Ruby では Object#is_a?...

絞り込み条件を変える