るりまサーチ

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

別のキーワード

  1. _builtin to_c
  2. etc sc_2_c_dev
  3. etc sc_2_c_bind
  4. tracer display_c_call
  5. tracer display_c_call=

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 > >>

DBM#fetch(key, ifnone = nil) -> String (24333.0)

データベースからキーを探して対応する要素の値を返します。

...('aaa.db', 0666, DBM::NEWDB)
db1[:a] = 'aaa'
db1[:b] = 'bbbbbb'
p db1.fetch('a') #=> 'aaa'
p db1.fetch('z', 'zzz') #=> 'zzz'
p db1.fetch('z'){|key| [:key, key] } #=> [:key, 'z']
p db1.fetch('z') #=> IndexError 発生

@see Hash#fetch...

Net::HTTPHeader#fetch(key) -> String (24331.0)

key ヘッダフィールドを返します。

...key ヘッダフィールドを返します。

たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。

該当するキーが登録されてい
ない時には、引数 default が与えられてい...
...p://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("user-agent") # => "Ruby"
//}

//emlist[例 key のみ指定。key が存在しない][ruby]{
require 'net/http'

begin
req.fetch("content-length")
rescue => e
e # => #<KeyError: key not found: "content-length">...
...le.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "default") # => "default"
//}

//emlist[例 key とブロックを指定][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("con...

Net::HTTPHeader#fetch(key) {|hash| .... } -> String (24331.0)

key ヘッダフィールドを返します。

...key ヘッダフィールドを返します。

たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。

該当するキーが登録されてい
ない時には、引数 default が与えられてい...
...p://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("user-agent") # => "Ruby"
//}

//emlist[例 key のみ指定。key が存在しない][ruby]{
require 'net/http'

begin
req.fetch("content-length")
rescue => e
e # => #<KeyError: key not found: "content-length">...
...le.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "default") # => "default"
//}

//emlist[例 key とブロックを指定][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("con...

Net::HTTPHeader#fetch(key, default) -> String (24331.0)

key ヘッダフィールドを返します。

...key ヘッダフィールドを返します。

たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。

該当するキーが登録されてい
ない時には、引数 default が与えられてい...
...p://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("user-agent") # => "Ruby"
//}

//emlist[例 key のみ指定。key が存在しない][ruby]{
require 'net/http'

begin
req.fetch("content-length")
rescue => e
e # => #<KeyError: key not found: "content-length">...
...le.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "default") # => "default"
//}

//emlist[例 key とブロックを指定][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("con...

Gem::RemoteFetcher#fetch_path(uri, mtime = nil, head = false) -> String | Hash (18303.0)

与えられた URI からダウンロードしたデータを文字列として返します。

与えられた URI からダウンロードしたデータを文字列として返します。

ヘッダ情報のみ取得した場合はハッシュを返します。

@param uri データ取得先の URI を指定します。

@param mtime 更新時刻を指定します。

@param head 真を指定するとヘッダ情報のみ取得します。

絞り込み条件を変える

Gem::RemoteFetcher#escape(str) -> String (9202.0)

URI 文字列をエンコードした文字列を返します。

...URI 文字列をエンコードした文字列を返します。

@param str 文字列を指定します。

@see URI.escape...

Gem::RemoteFetcher#unescape(str) -> String (9202.0)

URI 文字列をデコードした文字列を返します。

...URI 文字列をデコードした文字列を返します。

@param str 文字列を指定します。

@see URI.unescape...

Gem::SpecFetcher#cache_dir(uri) -> String (9202.0)

uri の内容を書き込むローカルのディレクトリ名を返します。

uri の内容を書き込むローカルのディレクトリ名を返します。

@param uri

Net::IMAP::FetchData#attr -> { String => object } (6286.0)

各メッセージのアトリビュートの値をハッシュテーブルで返します。

...の通りです。

: BODY
BODYSTRUCTURE の拡張データなしの形式。
Net::IMAP::BodyTypeBasic, Net::IMAP::BodyTypeText,
Net::IMAP::BodyTypeMessage, Net::IMAP::BodyTypeMultipart
のいずれか。
: BODY[<section>]<<partial>>
section で指定されたセクションの...
...。文字列。
: BODY.PEEK[<section>]<<partial>>
section で指定されたセクションのメッセージボディの内容。文字列。
ただしこれで内容を見ても :Seen フラグを設定しない点が
BODY[<section>]と同様
: BODYSTRUCTURE
MIME-IMB でのメッ...
...セージボディ。
Net::IMAP::BodyTypeBasic, Net::IMAP::BodyTypeText,
Net::IMAP::BodyTypeMessage, Net::IMAP::BodyTypeMultipart
のいずれか。
: ENVELOPE
メッセージのエンベロープ。
Net::IMAP::Envelope オブジェクト。
: FLAGS
メッセージにセッ...
<< 1 2 > >>