5件ヒット
[1-5件を表示]
(0.179秒)
クラス
-
Enumerator
:: Lazy (2) -
Net
:: IMAP (2) - Socket (1)
キーワード
-
connect
_ nonblock (1) - examine (1)
-
find
_ all (1)
検索結果
先頭5件
-
Net
:: IMAP # select(mailbox) -> Net :: IMAP :: TaggedResponse (72673.0) -
SELECT コマンドを送り、指定したメールボックスを処理対象の メールボックスにします。
SELECT コマンドを送り、指定したメールボックスを処理対象の
メールボックスにします。
このコマンドが成功すると、クライアントの状態が「selected」になります。
このコマンドを実行した直後に Net::IMAP#responses["EXISTS"].last
を調べると、メールボックス内のメールの数がわかります。
また、Net::IMAP#responses["RECENT"].lastで、
最新のメールの数がわかります。
これらの値はセッション中に変わりうることに注意してください。
Net::IMAP#add_response_handler を使うとそのような更新情報を
即... -
Enumerator
:: Lazy # select {|item| . . . } -> Enumerator :: Lazy (63709.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:find_all>
1.step.lazy.select { |i| i.even? }.take(10).force
# => [2, 4, 6,... -
Socket
# connect _ nonblock(server _ sockaddr) -> 0 (18340.0) -
ソケットをノンブロッキングモードに設定した後、 connect(2) を呼び出します。
ソケットをノンブロッキングモードに設定した後、
connect(2) を呼び出します。
引数、返り値は Socket#connect と同じです。
connect が EINPROGRESS エラーを報告した場合、その例外(Errno::EINPROGRESS)
には IO::WaitWritable が Object#extend されます。
これを connect_nonblock をリトライするために使うことができます。
# Pull down Google's web page
require 'socket'
include Socket::Constants
... -
Enumerator
:: Lazy # find _ all {|item| . . . } -> Enumerator :: Lazy (9409.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:find_all>
1.step.lazy.select { |i| i.even? }.take(10).force
# => [2, 4, 6,... -
Net
:: IMAP # examine(mailbox) -> Net :: IMAP :: TaggedResponse (9358.0) -
EXAMINE コマンドを送り、指定したメールボックスを処理対象の メールボックスにします。
EXAMINE コマンドを送り、指定したメールボックスを処理対象の
メールボックスにします。
Net::IMAP#select と異なりセッション中はメールボックスが
読み取り専用となります。それ以外は select と同じです。
@param mailbox 処理対象としたいメールボックスの名前(文字列)
@raise Net::IMAP::NoResponseError mailboxが存在しない等の理由でコマンドの実行に失敗
した場合に発生します。