ライブラリ
- ビルトイン (193)
- dbm (11)
- gdbm (11)
-
net
/ http (33) -
net
/ imap (77) - nkf (11)
- observer (11)
- pstore (11)
-
rinda
/ tuplespace (22) -
rubygems
/ commands / fetch _ command (11) -
rubygems
/ remote _ fetcher (198) -
rubygems
/ spec _ fetcher (154) -
rubygems
/ test _ utilities (22) - sdbm (11)
- socket (22)
- tsort (85)
-
yaml
/ dbm (22)
クラス
- Array (33)
- DBM (11)
- Data (4)
- GDBM (11)
-
Gem
:: RemoteFetcher (165) -
Gem
:: RemoteFetcher :: FetchError (22) -
Gem
:: SpecFetcher (143) - Hash (84)
- KeyError (14)
-
Net
:: IMAP (44) -
Net
:: IMAP :: FetchData (22) - PStore (11)
-
Rinda
:: TupleEntry (22) - SDBM (11)
- Socket (11)
- Thread (14)
-
YAML
:: DBM (22)
モジュール
-
Net
:: HTTPHeader (33) -
Socket
:: Constants (11) - TSort (85)
オブジェクト
- ENV (33)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - FakeFetcher (11)
- FetchCommand (11)
- FetchData (11)
- FetchError (11)
- KeyError (11)
-
MSG
_ ERRQUEUE (22) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (7) - NKF (11)
- Observable (11)
- RemoteFetcher (11)
- SpecFetcher (11)
- [] (40)
- attr (11)
-
cache
_ dir (11) -
connection
_ for (11) - define (4)
- dir (11)
- download (11)
-
each
_ strongly _ connected _ component (21) -
each
_ strongly _ connected _ component _ from (21) - escape (11)
-
fetch
_ path (11) -
fetch
_ size (11) -
fetch
_ spec (11) -
fetch
_ values (18) - fetcher (22)
- fetcher= (22)
-
file
_ uri? (11) -
find
_ matching (11) -
get
_ file _ uri _ path (11) -
get
_ proxy _ from _ env (11) - key (7)
-
latest
_ specs (11) -
legacy
_ repos (11) - list (11)
-
load
_ specs (11) -
net
/ http (11) -
net
/ imap (11) - new (33)
-
normalize
_ uri (11) -
open
_ uri _ or _ path (11) - receiver (7)
- request (11)
- reset (11)
-
rubygems
/ commands / fetch _ command (11) -
rubygems
/ remote _ fetcher (11) -
rubygems
/ spec _ fetcher (11) - seqno (11)
- specs (11)
- store (11)
-
strongly
_ connected _ components (11) - tsort (22)
-
tsort
_ each (21) -
uid
_ fetch (11) -
uid
_ store (11) - unescape (11)
- uri (11)
-
warn
_ legacy (11)
検索結果
先頭5件
-
Net
:: HTTPHeader # fetch(key) -> String (18127.0) -
key ヘッダフィールドを返します。
...http://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-lengt......: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("content-length") { |e| 99 } # =>... -
Net
:: HTTPHeader # fetch(key) {|hash| . . . . } -> String (18127.0) -
key ヘッダフィールドを返します。
...http://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-lengt......: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("content-length") { |e| 99 } # =>... -
Net
:: HTTPHeader # fetch(key , default) -> String (18127.0) -
key ヘッダフィールドを返します。
...http://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-lengt......: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("content-length") { |e| 99 } # =>... -
PStore
# fetch(name , default = PStore :: Error) -> object (18125.0) -
ルートnameに対応する値を得ます。
...]
ary = db["root"] = [1,2,3,4]
ary[0] = [1,1.5]
end
db.transaction(true) do |pstore|
pstore.fetch("root") # => [[1, 1.5], 2, 3, 4]
pstore.fetch("root", 'aaa') # => [[1, 1.5], 2, 3, 4]
pstore.fetch("not_root") # => 例外発生
end
@see Hash#fetch, PStore#[]... -
Array
# fetch(nth) -> object (18121.0) -
nth 番目の要素を返します。
...しなかった場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5]
begin
p a.fetch(10)
rescue IndexError => err
puts err #=> index 10 out of array
end
p a.fetch(10, 999) #=> 999
result = a.fetch(10){|nth|
print "#{nth} はありません。\n"
999
}
p result #=> 999
//}... -
Array
# fetch(nth) {|nth| . . . } -> object (18121.0) -
nth 番目の要素を返します。
...しなかった場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5]
begin
p a.fetch(10)
rescue IndexError => err
puts err #=> index 10 out of array
end
p a.fetch(10, 999) #=> 999
result = a.fetch(10){|nth|
print "#{nth} はありません。\n"
999
}
p result #=> 999
//}... -
Array
# fetch(nth , ifnone) -> object (18121.0) -
nth 番目の要素を返します。
...しなかった場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5]
begin
p a.fetch(10)
rescue IndexError => err
puts err #=> index 10 out of array
end
p a.fetch(10, 999) #=> 999
result = a.fetch(10){|nth|
print "#{nth} はありません。\n"
999
}
p result #=> 999
//}... -
Rinda
:: TupleEntry # fetch(key) -> object (18107.0) -
タプルの key に対応する要素を返します。
...タプルの key に対応する要素を返します。
Rinda::TupleEntry#value.fetch(key) を返します。
@param key 要素を指定するキー
@see Rinda::TupleEntry#[]... -
ENV
. fetch(key) -> String (18103.0) -
key に関連づけられた値を返します。該当するキーが登録されてい ない時には、引数 default が与えられていればその値を、ブロッ クが与えられていればそのブロックを評価した値を返します。そのいずれ でもなければ例外が発生します。
key に関連づけられた値を返します。該当するキーが登録されてい
ない時には、引数 default が与えられていればその値を、ブロッ
クが与えられていればそのブロックを評価した値を返します。そのいずれ
でもなければ例外が発生します。
@param key 環境変数の名前を指定します。 文字列で指定します。
文字列以外のオブジェクトを指定した場合は
to_str メソッドによる暗黙の型変換を試みます。
@param default keyに対応する環境変数の値がないときにこの値を返します。
@raise ... -
ENV
. fetch(key) {|key| . . . } -> String (18103.0) -
key に関連づけられた値を返します。該当するキーが登録されてい ない時には、引数 default が与えられていればその値を、ブロッ クが与えられていればそのブロックを評価した値を返します。そのいずれ でもなければ例外が発生します。
key に関連づけられた値を返します。該当するキーが登録されてい
ない時には、引数 default が与えられていればその値を、ブロッ
クが与えられていればそのブロックを評価した値を返します。そのいずれ
でもなければ例外が発生します。
@param key 環境変数の名前を指定します。 文字列で指定します。
文字列以外のオブジェクトを指定した場合は
to_str メソッドによる暗黙の型変換を試みます。
@param default keyに対応する環境変数の値がないときにこの値を返します。
@raise ...