別のキーワード
ライブラリ
- ビルトイン (220)
- erb (12)
- pp (12)
-
rexml
/ document (36) -
webrick
/ cgi (12) - win32ole (120)
クラス
- Binding (18)
- ERB (12)
- Module (36)
- NameError (10)
- Object (84)
-
REXML
:: XPath (36) - Thread (12)
- TracePoint (12)
-
WEBrick
:: CGI (12) -
WIN32OLE
_ TYPE (12) -
WIN32OLE
_ VARIABLE (96)
モジュール
- Kernel (60)
キーワード
- DATA (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (5) - Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Ruby用語集 (12)
-
WIN32OLE
_ VARIABLE (12) - binding (12)
-
class
_ variables (12) - constants (24)
- each (12)
- first (12)
-
global
_ variables (12) -
initialize
_ copy (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) -
irb
/ completion (12) -
local
_ variables (33) - match (12)
- name (12)
- new (12)
-
ole
_ type (12) -
ole
_ type _ detail (12) -
pretty
_ print _ instance _ variables (12) -
rb
_ f _ global _ variables (12) -
rb
_ f _ local _ variables (12) -
rb
_ mod _ class _ variables (12) -
rb
_ obj _ instance _ variables (12) -
ruby 1
. 8 . 3 feature (12) -
source
_ location (7) - start (12)
-
thread
_ variable _ set (12) -
to
_ s (12) -
trace
_ var (36) - value (12)
-
variable
_ kind (12) - varkind (12)
- visible? (12)
- オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル (12)
- クラス/メソッドの定義 (12)
- プログラム・文・式 (12)
- 変数と定数 (12)
検索結果
先頭5件
-
WIN32OLE
_ TYPE # variables -> [WIN32OLE _ VARIABLE] (18107.0) -
型が持つ変数を取得します。
...取得できない場合に通知します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'XlSheetType')
vars = tobj.variables
vars.each do |v|
puts "#{v.name} = #{v.value}"
end
上記を実行すると以下の出力が得られます。
xlChart = -4109... -
Module
# class _ variables(inherit = true) -> [Symbol] (6137.0) -
クラス/モジュールに定義されているクラス変数の名前の配列を返します。
...d
class Two < One
@@var2 = 2
end
One.class_variables # => [:@@var1]
Two.class_variables # => [:@@var2, :@@var1]
Two.class_variables(false) # => [:@@var2]
//}
@see Module.constants, Kernel.#local_variables, Kernel.#global_variables, Object#instance_variables, Module#constants... -
Kernel
. # global _ variables -> [Symbol] (6125.0) -
プログラム中で定義されているグローバル変数(`$'で始まる変数)名の 配列を返します。
...グラム中で定義されているグローバル変数(`$'で始まる変数)名の
配列を返します。
//emlist[例][ruby]{
p global_variables #=> [:$;, :$-F, :$@, ... ]
//}
@see Kernel.#local_variables,Object#instance_variables,Module.constants,Module#constants,Module#class_variables... -
Kernel
. # local _ variables -> [Symbol] (6125.0) -
現在のスコープで定義されているローカル変数名の配列を返します。
...現在のスコープで定義されているローカル変数名の配列を返します。
//emlist[例][ruby]{
yuyu = 0
p local_variables #=> [:yuyu]
//}
@see Kernel.#global_variables,Object#instance_variables,Module.constants,Module#constants,Module#class_variables... -
Object
# instance _ variables -> [Symbol] (6125.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#class_variables... -
Binding
# local _ variables -> [Symbol] (6113.0) -
ローカル変数の一覧を Symbol の配列で返します。
...カル変数の一覧を Symbol の配列で返します。
//emlist[例][ruby]{
def foo
a = 1
2.times do |n|
binding.local_variables #=> [:a, :n]
end
end
//}
このメソッドは以下のコードと同様の動作をします。
//emlist[][ruby]{
binding.eval("local_variables")
//}... -
NameError
# local _ variables -> [Symbol] (6107.0) -
self が発生した時に定義されていたローカル変数名の一覧を返します。
...発生した時に定義されていたローカル変数名の一覧を返します。
内部での使用に限ります。
例:
def foo
begin
b = "bar"
c = 123
d
rescue NameError => err
p err.local_variables #=> [:b, :c, :err]
end
end
a = "buz"
foo... -
Object
# pretty _ print _ instance _ variables -> [String | Symbol] (6101.0) -
プリティプリント時に表示すべき自身のインスタンス変数名の配列をソートして返します。 返されたインスタンス変数はプリティプリント時に表示されます。
プリティプリント時に表示すべき自身のインスタンス変数名の配列をソートして返します。
返されたインスタンス変数はプリティプリント時に表示されます。
pp に表示したくないインスタンス変数がある場合にこのメソッドを再定義します。 -
VALUE rb
_ f _ global _ variables(void) (6100.0) -