るりまサーチ

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

別のキーワード

  1. win32ole new
  2. win32ole to_s
  3. win32ole ole_type
  4. win32ole name
  5. win32ole ole_free

ライブラリ

クラス

検索結果

WIN32OLE_TYPE#ole_methods -> [WIN32OLE_METHOD] (18113.0)

型が持つメソッドのメタデータを取得します。

...
メソッドを持たない場合は空配列を返します。


tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
methods = tobj.ole_methods.map {|m| m.name }
# => ['QueryInterface', 'AddRef', 'Release',....]

@see WIN32OLE_METHOD...

WIN32OLE_TYPE#default_event_sources -> [WIN32OLE_TYPE] (36.0)

型が持つソースインターフェイスを取得します。

...を返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
tobj.default_event_sources.map {|intf| intf.name} #=> ["DocEvents"]

WIN32OLE_EVENT.newでインターフェイス名を指定しない場合は、ここで
返されたインターフェイスが...
...attr_reader :completed
end
source.ole_methods.each do |m|
WebEvent.module_eval do
define_method("on#{m.name}") do |*arg|
if arg[0] == "ページが表示されました"
@completed = true
end
puts "#{Time.now}: #{m.name} was called"
p arg
end...
...ruby-lang.org/ja/"]
2010-10-06 22:33:54 +0900: StatusTextChange was called
["ページが表示されました"]

@see WIN32OLE_TYPE.new, WIN32OLE_TYPE#progid,
WIN32OLE_TYPE#ole_methods, WIN32OLE_METHOD#name,
WIN32OLE_EVENT.new, WIN32OLE_EVENT#handler=,
WIN32OLE_EVENT.message_loop...

WIN32OLE_METHOD (30.0)

OLEオートメーションサーバが持つメソッドの情報を提供します。

...WIN32OLE#ole_methodsなどの呼び出しによって返さ
れるオブジェクトで、OLEオートメーションサーバのメソッドの情報(メタデー
タ)を保持します。

=== サンプルコード

excel = WIN32OLE.new('Excel.Application')
excel.ole_methods.each do |met...
...method.visible?
puts <<SIGNATURE
#{method.return_type} #{method.name}(#{
method.params.map {|p| "#{p.ole_type} #{p.name}"}.join(', ')
}) : #{method.helpstring}
SIGNATURE
end
end


@see WIN32OLE#ole_methods, WIN32OLE#ole_func_methods, WIN32OLE#ole_get_methods, WIN32OLE#ole_put_...

WIN32OLE#ole_get_methods -> [WIN32OLE_METHOD] (18.0)

オブジェクトの参照可能プロパティ情報をWIN32OLE_METHODの配列として 返します。

...excel.ole_get_methods.each do |prop|
begin
puts "#{prop.name}=#{excel._getproperty(prop.dispid, [], [])}"
rescue WIN32OLERuntimeError
puts "can't read #{prop.name} property"
end
end

@see WIN32OLE#ole_methods, WIN32OLE#ole_func_methods,
WIN32OLE#ole_put_methods...

WIN32OLE#ole_func_methods -> [WIN32OLE_METHOD] (12.0)

オブジェクトのファンクション情報をWIN32OLE_METHODの配列として返し ます。

...excel = WIN32OLE.new('Excel.Application')
excel.visible = true
excel.ole_func_methods.each do |fun|
if fun.name.upcase == 'QUIT'
excel._invoke(fun.dispid, [], [])
break
end
end

@see WIN32OLE#ole_methods, WIN32OLE#ole_get_methods,
WIN32OLE#ole_put_methods...

絞り込み条件を変える