るりまサーチ

最速Rubyリファレンスマニュアル検索!
108件ヒット [1-100件を表示] (0.096秒)

別のキーワード

  1. rexml/document new
  2. rexml/document write
  3. rexml/document clone
  4. rexml/document to_s
  5. rexml/document node_type

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

net/imap (38024.0)

このライブラリは Internet Message Access Protocol (IMAP) の クライアントライブラリです。2060 を元に 実装されています。

...require 'net/imap'

imap = Net::IMAP.new('mail.example.com')
imap.authenticate('LOGIN', 'joe_user', 'joes_password')
imap.examine('INBOX')
imap.search(["RECENT"]).each do |message_id|
envelope = imap.fetch(message_id, "ENVELOPE")[0].attr["ENVELOPE"]
puts "#{envelope.from[0].name}:...
...\t#{envelope.subject}"
end

2003年4月のメールをすべて Mail/sent-mail から "Mail/sent-apr03" へ移動させる

require 'net/imap'

imap = Net::IMAP.new('mail.example.com')
imap.authenticate('LOGIN', 'joe_user', 'joes_password')
imap.select('Mail/sent-mail')
if not imap.list(...
...[:Deleted])
end
imap.expunge

=== スレッド安全性
Net::IMAP は並列実行をサポートしています。例として、

require 'net/imap'

imap = Net::IMAP.new("imap.foo.net", "imap2")
imap.authenticate("cram-md5", "bar", "password")
imap.select("inbox")
fetch_thread = Thre...

Net::IMAP::Envelope#from -> [Net::IMAP::Address] | nil (26117.0)

From を Net::IMAP::Address オブジェクトの配列で返します。

...From を Net::IMAP::Address オブジェクトの配列で返します。

エンベロープに存在しないときは nil を返します。...

Net::IMAP#search(keys, charset = nil) -> [Integer] (8012.0)

SEARCH コマンドを送り、条件に合うメッセージの message sequence number を配列で返します。

...渡します。

検索条件は "SUBJECT", "FROM" などを用いることができます。
詳しくは 2060 の 6.4.4 を見てください。

例:
p imap.search(["SUBJECT", "hello"])
#=> [1, 6, 7, 8]
p imap.search(["SUBJECT", "hello", "FROM", "foo@example.com"])
#=> [6, 7]
p imap.sea...

Net::IMAP#sort(sort_keys, search_keys, charset) -> [Integer] (8012.0)

SORT コマンド送り、メールボックス内の メッセージをソートした結果を返します。

...可能かどうか判断できます。

sort_keys にはソート順を決めるキーを文字列の配列で指定します。
"ARRIVAL", "CC", "FROM", "TO", "SUBJECT" などが指定できます。
詳しくは 5265 の BASE.6.4.SORT の所を見てください。

search_key には検索条件...
...指定したメールボックスを対象とします。

返り値は message sequence number の配列を返します。

例:
p imap.sort(["FROM"], ["ALL"], "US-ASCII")
#=> [1, 2, 3, 5, 6, 7, 8, 4, 9]
p imap.sort(["DATE"], ["SUBJECT", "hello"], "US-ASCII")
#=> [6, 7, 8, 1]
@param sort_ke...

Net::IMAP#uid_search(keys, charset = nil) -> [Integer] (8012.0)

UID SEARCH コマンドを送り、条件に合うメッセージの UID を配列で返します。

...します。

検索条件は "SUBJECT", "FROM" などを用いることができます。
詳しくは 2060 の 6.4.4 を見てください。

例:
p imap.uid_search(["SUBJECT", "hello"])
#=> [1, 6, 7, 8]
p imap.uid_search(["SUBJECT", "hello", "FROM", "foo@example.com"])
#=> [6, 7]
p ima...

絞り込み条件を変える

Net::IMAP#uid_sort(sort_keys, search_keys, charset) -> [Integer] (8012.0)

SORT コマンド送り、メールボックス内の メッセージをソートした結果を返します。

...可能かどうか判断できます。

sort_keys にはソート順を決めるキーを文字列の配列で指定します。
"ARRIVAL", "CC", "FROM", "TO", "SUBJECT" などが指定できます。
詳しくは 5265 の BASE.6.4.SORT の所を見てください。

search_key には検索条件...
...指定したメールボックスを対象とします。

返り値は message sequence number の配列を返します。

例:
p imap.sort(["FROM"], ["ALL"], "US-ASCII")
#=> [1, 2, 3, 5, 6, 7, 8, 4, 9]
p imap.sort(["DATE"], ["SUBJECT", "hello"], "US-ASCII")
#=> [6, 7, 8, 1]
@param sort_ke...

Net::IMAP#append(mailbox, message, flags = nil, date_time = nil) -> Net::IMAP::TaggedResponse (8006.0)

APPEND コマンドを送ってメッセージをメールボックスの末尾に追加します。

...をメールボックスの末尾に追加します。


例:
imap.append("inbox", <<EOF.gsub(/\n/, "\r\n"), [:Seen], Time.now)
Subject: hello
From
: someone@example.com
To: somebody@example.com

hello world
EOF

@param mailbox メッセージを追加するメールボックス名(文...

NEWS for Ruby 2.0.0 (36.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ence
from
a method or a block.
* 追加: RubyVM::InstructionSequence#path,
RubyVM::InstructionSequence#absolute_path,
RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#base_label,
RubyVM::InstructionSequence#first_lineno to retrieve information from whe...
...readable は IO#wait の別名です。

* json
* 1.7.7 に更新

* net/http
* 新機能
* Proxies are now automatically detected from the http_proxy environment
variable. See Net::HTTP.new for details.
* gzip and deflate compression are now requested for all reques...
...cified.

* net/imap
* 追加: Net::IMAP.default_port
* 追加: Net::IMAP.default_imap_port
* 追加: Net::IMAP.default_tls_port
* 追加: Net::IMAP.default_ssl_port
* 追加: Net::IMAP.default_imaps_port

* objspace
* 追加: ObjectSpace.#reachable_objects_from

* opens...

ruby 1.8.2 feature (12.0)

ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。

...].pack("L")'
"\000\000\000\000"

$ ruby-1.8.2 -e 'p [nil].pack("L")'
-e:1:in `pack': cannot convert nil into Integer (TypeError)
from
-e:1

$ ruby-1.8.2 -e 'p [nil].pack("P")'
"\000\000\000\000"

=== 2004-10-27
: CGI [lib] [bug]
無限ループに陥る可能性...
...。((<ruby-list:39102>))

=== 2004-06-29

: misc
$SAFEが保存されない問題を修正しました。((<ruby-dev:23829>))

=== 2004-06-23
: net/imap [lib] [new]
added new option --ssl

=== 2004-06-16

: object.c [ruby] [bug]
特異クラスが特異オブジェクトのクラスを継...
<< 1 2 > >>