36件ヒット
[1-36件を表示]
(0.064秒)
種類
- インスタンスメソッド (24)
- 特異メソッド (12)
ライブラリ
-
webrick
/ httpproxy (12) - win32ole (24)
クラス
-
WEBrick
:: HTTPProxyServer (12) -
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (12)
キーワード
-
default
_ event _ sources (12) - new (12)
検索結果
先頭3件
-
WIN32OLE
_ EVENT # handler=(obj) -> () (18142.0) -
イベント処理を実行するオブジェクトを登録します。
...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
@completed = true
end
def method_missing(id, *args)
pu......t}"
end
end
ie = WIN32OLE.new('InternetExplorer.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
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (48.0) -
型が持つソースインターフェイスを取得します。
...nitialize
@completed = false
end
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.n......ame} 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
このプログラムを実行するとWindows7のIE8環......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... -
WEBrick
:: HTTPProxyServer . new(config , default = WEBrick :: Config :: HTTP) -> WEBrick :: HTTPProxyServer (12.0) -
プロクシオブジェクトを生成して返します。
...ion']
res['Proxy-Authenticate'] = 'Basic realm="WEBrick Proxy"'
raise WEBrick::HTTPStatus::ProxyAuthenticationRequired
else
# 略
end
}
s = WEBrick::HTTPProxyServer.new(ProxyAuthProc: auth_proc, Port: 8080)
//}
: :ProxyContentHandler
接続先の HTTP サーバからの内......。
nil を指定した場合なにもしません。デフォルトは nil です。
//emlist{
require 'webrick'
require 'webrick/httpproxy'
handler = proc{|req, res|
res.body.gsub!(/です。/, 'でんがな。')
res.body.gsub!(/ます。/, 'まんがな。')
}
s = WEBrick::HTTPProxyS...