33件ヒット
[1-33件を表示]
(0.082秒)
種類
- インスタンスメソッド (22)
- 特異メソッド (11)
ライブラリ
-
webrick
/ httpproxy (11) - win32ole (22)
クラス
-
WEBrick
:: HTTPProxyServer (11) -
WIN32OLE
_ EVENT (11) -
WIN32OLE
_ TYPE (11)
キーワード
-
default
_ event _ sources (11) - new (11)
検索結果
先頭3件
-
WIN32OLE
_ EVENT # handler=(obj) -> () (18230.0) -
イベント処理を実行するオブジェクトを登録します。
...ジェクトをイベントハンドラとし
て登録します。
イベントハンドラはイベント名に「on」を前置します。もし、イベントに対応
するonメソッドが実装されていなければmethod_missingが呼ばれます。イベン
ト名は大文字小文字......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などの呼び... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (406.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}"......(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環境では以下のような出力を得られ
ます。
2010-10-06 22:33:54......c1-4158-11d0-90f6-00c04fd497ea}"]
2010-10-06 22:33:54 +0900: BeforeNavigate2 was called
[#<WIN32OLE:0x9d08f0>, "http://www.ruby-lang.org/", 0, "", nil, "", false]
2010-10-06 22:33:54 +0900: DownloadBegin was called
[]
2010-10-06 22:33:54 +0900: PropertyChange was called
["{D0FCA420-D3F5-11CF-B... -
WEBrick
:: HTTPProxyServer . new(config , default = WEBrick :: Config :: HTTP) -> WEBrick :: HTTPProxyServer (318.0) -
プロクシオブジェクトを生成して返します。
...プロクシオブジェクトを生成して返します。
@param config 設定を保存したハッシュを指定します。
設定として有効なハッシュのキーとその値は WEBrick::HTTPServer.new と同じです。
それに加えて以下のキーが......unless c = req['proxy-authorization']
res['Proxy-Authenticate'] = 'Basic realm="WEBrick Proxy"'
raise WEBrick::HTTPStatus::ProxyAuthenticationRequired
else
# 略
end
}
s = WEBrick::HTTPProxyServer.new(ProxyAuthProc: auth_proc, Port: 8080)
//}
: :ProxyContentHandler
接続......PResponse オブジェクトと
WEBrick::HTTPRequest オブジェクトを引数として proc.call(req, res) のように呼ばれます。
nil を指定した場合なにもしません。デフォルトは nil です。
//emlist{
require 'webrick'
require 'webrick/httpproxy'
handler = proc...