るりまサーチ

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

別のキーワード

  1. optparse on
  2. optionparser on
  3. tracer on
  4. socket udp_server_loop_on
  5. thread abort_on_exception

ライブラリ

キーワード

検索結果

WIN32OLE_EVENT#handler=(obj) -> () (18124.0)

イベント処理を実行するオブジェクトを登録します。

...ジェクトをイベントハンドラとし
て登録します。

イベントハンドラはイベント名に「on」を前置します。もし、イベントに対応
するonメソッドが実装されていなければmethod_missingが呼ばれます。イベン
ト名は大文字小文字...
...解除するにはnilを指定します。

class IeHandler
def initialize
@completed = false
end
attr_reader :completed
def onDocumentComplete(disp, uri)
disp.document.getElementsByTagName('a').each do |e|
puts "#{e.innerHTML}=#{e.href}"
end
@compl...
...ternetExplorer.Application.1')
event = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents2')
event.handler = IeHandler.new
ie.Navigate2 'http://www.ruby-lang.org/ja/'
loop do
break if event.handler.completed
WIN32OLE_EVENT.message_loop
end
ie.Quit

WIN32OLE_EVENT#on_eventなどの呼び...

WEBrick::HTTPProxyServer.new(config, default = WEBrick::Config::HTTP) -> WEBrick::HTTPProxyServer (206.0)

プロクシオブジェクトを生成して返します。

...プロクシオブジェクトを生成して返します。

@param config 設定を保存したハッシュを指定します。
設定として有効なハッシュのキーとその値は WEBrick::HTTPServer.new と同じです。
それに加えて以下のキーが...
...有効です。

: :ProxyAuthProc
プロクシ認証を行う Proc オブジェクトを指定します。この proc は
WEBrick::HTTPResponse オブジェクトと WEBrick::HTTPRequest オブジェクトを引数として
proc.call(req, res) のように呼ばれます。
認証に失敗...
...PResponse オブジェクトと
WEBrick::HTTPRequest オブジェクトを引数として proc.call(req, res) のように呼ばれます。
nil を指定した場合なにもしません。デフォルトは nil です。
//emlist{
require 'webrick'
require 'webrick/httpproxy'
handler =
proc...

WIN32OLE_TYPE#default_event_sources -> [WIN32OLE_TYPE] (12.0)

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

...Internet Controls', 'InternetExplorer')
ctl = WIN32OLE.new(type.progid)
source = type.default_event_sources[0]
class WebEvent
def initialize
@completed = false
end
attr_reader :completed
end
source.ole_methods.each do |m|
WebEvent.module_eval do
define_method("on#{m.name}"...
...completed = true
end
puts "#{Time.now}: #{m.name} was called"
p arg
end
end
end
evt = WIN32OLE_EVENT.new(ctl)
evt.handler = WebEvent.new
ctl.navigate2 'http://www.ruby-lang.org/'
loop do
break if evt.handler.completed
WIN32OLE_EVENT.message_loop
end
ctl.Quit...
...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...