るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.148秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:kernel[x] > クエリ:p[x] > クエリ:j[x] > クエリ:instance_variables[x]

別のキーワード

  1. encoding windows_31j
  2. encoding cswindows31j
  3. _builtin windows_31j
  4. _builtin cswindows31j
  5. json j

ライブラリ

クラス

検索結果

Object#instance_variables -> [Symbol] (21126.0)

オブジェクトのインスタンス変数名をシンボルの配列として返します。

...ンボルの配列として返します。

//emlist[][ruby]{
obj = Object.new
obj.instance_eval { @foo, @bar = nil }
p
obj.instance_variables

#=> [:@foo, :@bar]
//}

@see Object#instance_variable_get, Kernel.#local_variables, Kernel.#global_variables, Module.constants, Module#constants, Module#cla...