るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

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

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

...です。

//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 (3006.0)

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

...です。

//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...

Ruby用語集 (78.0)

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

...ンの
間でオブジェクトにアクセスできる。

===[a:E] E

: ENV
環境変数にアクセスするためのオブジェクト。
Hash
に似たインターフェースを持つ。キーも値も文字列である。
ENV で環境変数を変更すると Ruby の子プロセス...
...by から。

参照:irb

: is-a 関係
Ruby では Object#is_a? で確認できる関係。

たとえば、配列オブジェクトは Array クラスや Enumerable モジュール、Object クラス
などに対して is_a? の関係にある。

: ISO/IEC 30170
JIS X 3017 の原規...
...「可変長引数」という用語の
ほうが普及している。

英語の variadic は形容詞である。

: 空
: empty
Array や Hash、Struct のような要素を持つクラスでは、要素が無いことを
「空(から)」と呼ぶ。

また、String クラスで...

irb/completion (12.0)

irb の completion 機能を提供するライブラリです。

...一覧がでます.

irb(main):003:0> foo.
foo.== foo.frozen? foo.protected_methods
foo.=== foo.hash foo.public_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect...
....class foo.instance_of? foo.taint
foo.clone foo.instance_variables foo.tainted?
foo.display foo.is_a? foo.to_a
foo.dup foo.kind_of? foo.to_s
foo.eql? foo.method foo.type
foo...