33件ヒット
[1-33件を表示]
(0.102秒)
種類
- インスタンスメソッド (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) -> () (21142.0) -
イベント処理を実行するオブジェクトを登録します。
...thod_missingが呼ばれます。イベン
ト名は大文字小文字を区別するため、正確な記述が必要です。
@param obj イベントに対応するメソッドを持つオブジェクト。イベント受信を
解除するにはnilを指定します。
class IeHand......ler
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)......vent=#{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... -
WEBrick
:: HTTPProxyServer . new(config , default = WEBrick :: Config :: HTTP) -> WEBrick :: HTTPProxyServer (3212.0) -
プロクシオブジェクトを生成して返します。
...プロクシオブジェクトを生成して返します。
@param config 設定を保存したハッシュを指定します。
設定として有効なハッシュのキーとその値は WEBrick::HTTPServer.new と同じです。
それに加えて以下のキーが......//emlist{
require 'webrick'
require 'webrick/httpproxy'
auth_proc = proc{|req, res|
unless c = req['proxy-authorization']
res['Proxy-Authenticate'] = 'Basic realm="WEBrick Proxy"'
raise WEBrick::HTTPStatus::ProxyAuthenticationRequired
else
# 略
end
}
s = WEBrick::HTTPP......ジェクトと
WEBrick::HTTPRequest オブジェクトを引数として proc.call(req, res) のように呼ばれます。
nil を指定した場合なにもしません。デフォルトは nil です。
//emlist{
require 'webrick'
require 'webrick/httpproxy'
handler = proc{|req, res|
r... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (3148.0) -
型が持つソースインターフェイスを取得します。
...IN32OLE_TYPEの配列と
して返します。返すのは配列ですが、デフォルトのソースインターフェ
イスは最大でも1インターフェイスです。ソースインターフェイスを持
たない場合は空配列を返します。
tobj = WI......。
# coding : cp932
require 'win32ole'
type = WIN32OLE_TYPE.new('Microsoft 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.o......o
define_method("on#{m.name}") do |*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 'htt...