44件ヒット
[1-44件を表示]
(0.165秒)
種類
- インスタンスメソッド (22)
- 特異メソッド (22)
ライブラリ
- psych (11)
-
webrick
/ httpproxy (11) - win32ole (22)
クラス
-
Psych
:: Parser (11) -
WEBrick
:: HTTPProxyServer (11) -
WIN32OLE
_ EVENT (11) -
WIN32OLE
_ TYPE (11)
キーワード
-
default
_ event _ sources (11) - new (22)
検索結果
先頭4件
-
WIN32OLE
_ EVENT # handler=(obj) -> () (24312.0) -
イベント処理を実行するオブジェクトを登録します。
...@param obj イベントに対応するメソッドを持つオブジェクト。イベント受信を
解除するにはnilを指定します。
class IeHandler
def initialize
@completed = false
end
attr_reader :completed
def onDocumentComplete(disp, uri)......nerHTML}=#{e.href}"
end
@completed = true
end
def method_missing(id, *args)
puts "event=#{id.to_s}, args=#{args.inspect}"
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_EVENT#on_eventなどの呼び出しでブロックが登録されている場
合、そちらが優先されます。... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (6500.0) -
型が持つソースインターフェイスを取得します。
...default_event_sourcesメソッドは、selfがCoClass(コンポーネントクラス)
の場合、そのクラスがサポートするデフォルトのソースインターフェイス(イ
ベントの通知元となるインターフェイス)を返します。
@return デフォルト......*arg|
if arg[0] == "ページが表示されました"
@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
brea......evt.handler.completed
WIN32OLE_EVENT.message_loop
end
ctl.Quit
このプログラムを実行するとWindows7のIE8環境では以下のような出力を得られ
ます。
2010-10-06 22:33:54 +0900: PropertyChange was called
["{265b75c1-4158-11d0-90f6-00c04fd497ea}"]
2010-10-06 22:33:5... -
WEBrick
:: HTTPProxyServer . new(config , default = WEBrick :: Config :: HTTP) -> WEBrick :: HTTPProxyServer (3318.0) -
プロクシオブジェクトを生成して返します。
...ram config 設定を保存したハッシュを指定します。
設定として有効なハッシュのキーとその値は WEBrick::HTTPServer.new と同じです。
それに加えて以下のキーが有効です。
: :ProxyAuthProc
プロクシ認証を行う Pr......rick::HTTPAuth::ProxyBasicAuth か
WEBrick::HTTPAuth::ProxyDigestAuth を使用します。
//emlist{
require 'webrick'
require 'webrick/httpproxy'
auth_proc = proc{|req, res|
unless c = req['proxy-authorization']
res['Proxy-Authenticate'] = 'Basic realm="WEBrick Proxy"'
raise WEBr......TPResponse オブジェクトと
WEBrick::HTTPRequest オブジェクトを引数として proc.call(req, res) のように呼ばれます。
nil を指定した場合なにもしません。デフォルトは nil です。
//emlist{
require 'webrick'
require 'webrick/httpproxy'
handler = pro... -
Psych
:: Parser . new(handler = Handler . new) -> Psych :: Parser (3301.0) -
新たなパーサオブジェクトを生成して返します。
...新たなパーサオブジェクトを生成して返します。
handler で YAML のイベントを処理するハンドラを指定します。
詳しくは Psych::Parser を参照してください。
@param handler YAML のイベントを処理するハンドラ...