88件ヒット
[1-88件を表示]
(0.058秒)
種類
- インスタンスメソッド (44)
- ライブラリ (22)
- 特異メソッド (11)
- クラス (11)
クラス
-
Net
:: SMTP (11) - WIN32OLE (11)
-
WIN32OLE
_ EVENT (22) -
WIN32OLE
_ TYPE (11)
キーワード
-
WIN32OLE
_ EVENT (11) - debug (11)
-
default
_ event _ sources (11) - handler= (11)
- irb (11)
-
ole
_ respond _ to? (11)
検索結果
先頭5件
-
Net
:: SMTP # quit -> Net :: SMTP :: Response (18323.0) -
QUIT コマンドを送ります。
...QUIT コマンドを送ります。
通常は Net::SMTP#finish で
QUIT が送られるため利用する必要はないはずです。... -
WIN32OLE
# ole _ respond _ to?(name) -> bool (6206.0) -
指定したメソッドをオブジェクトがサポートしているか調べます。
...ド名を文字列またはシンボルで指定します。
@return nameで指定したメソッドをオブジェクトが提供していれば真を返します。
excel = WIN32OLE.new('Excel.Application')
excel.ole_respond_to?(:quit) #=> true
excel.ole_respond_to?(:exit) #=> false... -
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}"......by-lang.org/'
loop do
break if 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-0......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-B211-00AA004AE837}"]
2010-10-06 22... -
irb (300.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...ions] file_name opts
options:
-f ~/.irbrc を読み込まない
-m bc モード (分数と行列の計算ができる)
-d $DEBUG を true にする (ruby -d と同じ)
-w ruby -w と同じ
-W[level=2] ruby -W と同じ
-......ruby -r と同じ
-I ruby -I と同じ
-U ruby -U と同じ
-E enc ruby -E と同じ
--verbose これから実行する行を表示する
--noverbose これから実行する行を表示しない (デフォルト)
--echo......irb_exit
: quit
: irb_quit
irb を終了します。
サブ irb で呼び出した場合は、そのサブ irb だけを終了します。
: conf
: context
: irb_context
irb の現在の設定です。IRB::Context オブジェクトです。
このメソッドで得た IRB::Context オ......[options] file_name opts
options:
-f ~/.irbrc を読み込まない
-d $DEBUG を true にする (ruby -d と同じ)
-w ruby -w と同じ
-W[level=2] ruby -W と同じ
-r library ruby -r と同じ
-I ruby -I と......ruby -U と同じ
-E enc ruby -E と同じ
--verbose これから実行する行を表示する
--noverbose これから実行する行を表示しない (デフォルト)
--echo 実行結果を表示する (デフォルト)
--noecho... -
WIN32OLE
_ EVENT # handler=(obj) -> () (130.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
_ EVENT . message _ loop -> () (124.0) -
Windowsのメッセージポンプを実行します。
...etExplorer.Application.1')
event = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents2')
b = false
event.on_event('DocumentComplete') do |disp, uri|
disp.document.getElementsByTagName('a').each do |e|
puts "#{e.innerHTML}=#{e.href}" #=> ダウンロード=http://www.ruby-lang.org/ja/downloa......ds/ など
end
disp.quit
b = true
end
ie.Navigate2 'http://www.ruby-lang.org/ja/'
loop do
break if b
WIN32OLE_EVENT.message_loop
end
なお、メソッド名はloopですが、呼び出し時および既にキューイングされたメッ
セージの処理中にキュ... -
debug (54.0)
-
Ruby デバッガです。Ruby スクリプトのソースコードデバッグに使用します。
...x.el が
https://github.com/ruby/elisp にあるので、活用してください。
=== 使い方
$ ruby -rdebug foo.rb
または、Emacs から
M-x load-library rubydb3x.el
M-x rubydb
=== デバッグコマンド
以下は、デバッガで使用できるコマンド名とその用......。
ここに挙げたもの以外を入力した場合、その入力を ruby の式として評価します。
: break
: break [<file>:]<position>|<class>:<method>
ブレークポイントを設定します。引数を省略した場合設定したブレークポ
イントを表示しま......このコマンドの省略形は tr です。
: quit
スクリプトを中断し、デバッガを終了します。
このコマンドの省略形は q です。
: var g[lobal]
: var l[ocal]
: var i[nstance] <object>
: var c[onst] <object>
それぞれ、グローバル変数... -
WIN32OLE
_ EVENT (24.0) -
OLEオートメーションサーバからのイベント通知を制御するクラスです。
...etExplorer.Application.1')
event = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents2')
b = false
event.on_event('DocumentComplete') do |disp, uri|
disp.document.getElementsByTagName('a').each do |e|
puts "#{e.innerHTML}=#{e.href}" #=> ダウンロード=http://www.ruby-lang.org/ja/downloa......ds/ など
end
disp.quit
b = true
end
ie.Navigate2 'http://www.ruby-lang.org/ja/'
loop do
break if b
WIN32OLE_EVENT.message_loop
end...