245件ヒット
[1-100件を表示]
(0.112秒)
別のキーワード
ライブラリ
- ビルトイン (124)
- pp (11)
-
webrick
/ cgi (11) - win32ole (99)
クラス
- Binding (16)
- Module (22)
- NameError (9)
- Object (66)
- Thread (11)
- TracePoint (11)
-
WEBrick
:: CGI (11) -
WIN32OLE
_ TYPE (11) -
WIN32OLE
_ VARIABLE (88)
キーワード
- binding (11)
-
class
_ variables (11) - constants (11)
-
initialize
_ copy (11) -
instance
_ variable _ defined? (11) -
instance
_ variable _ get (11) -
instance
_ variable _ set (11) -
instance
_ variables (11) -
local
_ variables (19) - name (11)
-
ole
_ type (11) -
ole
_ type _ detail (11) -
pretty
_ print _ instance _ variables (11) -
source
_ location (6) - start (11)
-
thread
_ variable _ set (11) -
to
_ s (11) - value (11)
-
variable
_ kind (11) - varkind (11)
- visible? (11)
検索結果
先頭5件
-
WIN32OLE
_ TYPE # variables -> [WIN32OLE _ VARIABLE] (18108.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] (6138.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... -
Object
# instance _ variables -> [Symbol] (6126.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] (6114.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] (6108.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] (6102.0) -
プリティプリント時に表示すべき自身のインスタンス変数名の配列をソートして返します。 返されたインスタンス変数はプリティプリント時に表示されます。
プリティプリント時に表示すべき自身のインスタンス変数名の配列をソートして返します。
返されたインスタンス変数はプリティプリント時に表示されます。
pp に表示したくないインスタンス変数がある場合にこのメソッドを再定義します。 -
Module
# constants(inherit = true) -> [Symbol] (25.0) -
そのモジュール(またはクラス)で定義されている定数名の配列を返します。
...ます。false を指定した場合 対象にはなりません。
@see Module.constants, Kernel.#local_variables, Kernel.#global_variables, Object#instance_variables, Module#class_variables
//emlist[Module.constants と Module#constants の違い][ruby]{
# 出力の簡略化のため起動時の... -
Object
# initialize _ copy(obj) -> object (25.0) -
(拡張ライブラリによる) ユーザ定義クラスのオブジェクトコピーの初期化メソッド。
...ck(obj)
puts "instance variables: #{obj.inspect}"
puts "tainted?: #{obj.tainted?}"
print "singleton methods: "
begin
p obj.bar
rescue NameError
p $!
end
end
obj.foo = 1
obj.taint
check Object.new.send(:initialize_copy, obj)
#=> instance variables: #<Object:0x4019c9d4>......n methods: #<NoMethodError: ...>
check obj.dup
#=> instance variables: #<Object:0x4019c9c0 @foo=1>
# tainted?: true
# singleton methods: #<NoMethodError: ...>
check obj.clone
#=> instance variables: #<Object:0x4019c880 @foo=1>
# tainted?: true
#......:bar
end
end
def check(obj)
puts "instance variables: #{obj.inspect}"
print "singleton methods: "
begin
p obj.bar
rescue NameError
p $!
end
end
obj.foo = 1
check Object.new.send(:initialize_copy, obj)
#=> instance variables: #<Object:0x4019c9d4>
# singleton m......ethods: #<NoMethodError: ...>
check obj.dup
#=> instance variables: #<Object:0x4019c9c0 @foo=1>
# singleton methods: #<NoMethodError: ...>
check obj.clone
#=> instance variables: #<Object:0x4019c880 @foo=1>
# singleton methods: :bar
//}... -
WIN32OLE
_ VARIABLE # name -> String (19.0) -
変数名を取得します。
...変数名を取得します。
@return 変数名を文字列で返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |variable|
puts "#{variable.name}" # => xlChart, xlDialogSheet, ...
end... -
WIN32OLE
_ VARIABLE # ole _ type -> String (19.0) -
変数の型を取得します。
...の形式の文字列
を返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |variable|
puts "#{variable.ole_type} #{variable.name}"
end
OLEオートメーションの型名は、対応す...