Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix markups as RDoc. - Remove already descriptions of removed methods.
- Loading branch information
Showing
2 changed files
with
39 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
README for expect | ||
= README for expect | ||
by A. Ito, 28 October, 1998 | ||
|
||
Expectライブラリは,tcl の expect パッケージと似たような機能を | ||
Expectライブラリは,tcl の expect パッケージと似たような機能を | ||
IOクラスに追加します. | ||
|
||
追加されるメソッドの使い方は次の通りです. | ||
追加されるメソッドの使い方は次の通りです. | ||
|
||
IO#expect(pattern,timeout=9999999) | ||
[IO#expect(pattern,timeout=9999999)] | ||
|
||
pattern は String か Regexp のインスタンス,timeout は Fixnum | ||
のインスタンスです.timeout は省略できます. | ||
このメソッドがブロックなしで呼ばれた場合,まずレシーバである | ||
IOオブジェクトから pattern にマッチするパターンが読みこまれる | ||
まで待ちます.パターンが得られたら,そのパターンに関する配列を | ||
返します.配列の最初の要素は,pattern にマッチするまでに読みこ | ||
まれた内容の文字列です.2番目以降の要素は,pattern の正規表現 | ||
の中にアンカーがあった場合に,そのアンカーにマッチする部分です. | ||
もしタイムアウトが起きた場合は,このメソッドはnilを返します. | ||
このメソッドがブロック付きで呼ばれた場合には,マッチした要素の | ||
配列がブロック引数として渡され,ブロックが評価されます. | ||
_pattern_ は String か Regexp のインスタンス,_timeout_ は Fixnum | ||
のインスタンスです._timeout_ は省略できます. | ||
|
||
このメソッドがブロックなしで呼ばれた場合,まずレシーバである | ||
IOオブジェクトから _pattern_ にマッチするパターンが読みこまれる | ||
まで待ちます.パターンが得られたら,そのパターンに関する配列を | ||
返します.配列の最初の要素は,_pattern_ にマッチするまでに読みこ | ||
まれた内容の文字列です.2番目以降の要素は,_pattern_ の正規表現 | ||
の中にアンカーがあった場合に,そのアンカーにマッチする部分です. | ||
もしタイムアウトが起きた場合は,このメソッドは +nil+ を返します. | ||
|
||
このメソッドがブロック付きで呼ばれた場合には,マッチした要素の | ||
配列がブロック引数として渡され,ブロックが評価されます. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters