572件ヒット
[1-100件を表示]
(0.113秒)
クラス
- CSV (33)
-
CSV
:: FieldInfo (11) -
Net
:: HTTPGenericRequest (88) -
Net
:: HTTPResponse (99) -
Psych
:: Parser :: Mark (11)
モジュール
-
Net
:: HTTPHeader (330)
キーワード
- [] (11)
- []= (11)
-
basic
_ auth (11) - body (22)
- body= (11)
-
body
_ stream (11) -
body
_ stream= (11) - chunked? (11)
- code (11)
-
content
_ length (11) -
content
_ length= (11) -
content
_ range (11) -
content
_ type= (11) - convert (33)
- delete (11)
- each (11)
-
each
_ capitalized _ name (11) -
each
_ header (11) -
each
_ key (11) -
each
_ name (11) -
each
_ value (11) - entity (11)
- fetch (33)
-
form
_ data= (11) -
get
_ fields (11) -
http
_ version (11) - key? (11)
-
main
_ type (11) - method (22)
- msg (11)
- path (11)
-
proxy
_ basic _ auth (11) - range (11)
-
range
_ length (11) -
read
_ body (22) -
request
_ body _ permitted? (11) -
response
_ body _ permitted? (11) -
set
_ content _ type (11) -
set
_ form _ data (11) -
sub
_ type (11) -
type
_ params (11) - value (11)
検索結果
先頭5件
-
Psych
:: Parser :: Mark # index -> Integer (21102.0) -
先頭からの文字数。
先頭からの文字数。 -
CSV
:: FieldInfo # index -> Integer (18114.0) -
行内で何番目のフィールドかわかるゼロベースのインデックスを返します。
...][ruby]{
require 'csv'
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", headers: true)
csv.convert do |field,field_info|
p field_info.index
Date.parse(field)
end
p csv.first
# => 0
# => 1
# => #<CSV::Row "date1":#<Date: 2018-07-09 ((2458309j,0s,0n),+0s,2299161j)> "date2":#<Date: 2018-07-10... -
Net
:: HTTPHeader # fetch(key) -> String (37.0) -
key ヘッダフィールドを返します。
...指定します。
@raise IndexError 引数defaultもブロックも与えられてない時、キーの探索に 失敗すると発生します。
//emlist[例 key のみ指定。key が存在する][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::G......net/http'
uri = URI.parse('http://www.example.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::H... -
Net
:: HTTPHeader # fetch(key) {|hash| . . . . } -> String (37.0) -
key ヘッダフィールドを返します。
...指定します。
@raise IndexError 引数defaultもブロックも与えられてない時、キーの探索に 失敗すると発生します。
//emlist[例 key のみ指定。key が存在する][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::G......net/http'
uri = URI.parse('http://www.example.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::H... -
Net
:: HTTPHeader # fetch(key , default) -> String (37.0) -
key ヘッダフィールドを返します。
...指定します。
@raise IndexError 引数defaultもブロックも与えられてない時、キーの探索に 失敗すると発生します。
//emlist[例 key のみ指定。key が存在する][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::G......net/http'
uri = URI.parse('http://www.example.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::H... -
Net
:: HTTPHeader # form _ data=(params) (25.0) -
HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。
...URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} # => {"q"=>["ruby", "perl"], "lang"=>"en"}
//}
//emlist[例 set_form_data][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.htm... -
Net
:: HTTPHeader # range -> Range|nil (25.0) -
Range: ヘッダの示す範囲を Range オブジェクトで返します。
...e 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['range'] = "bytes=1-5"
req.range # => [1..5]
//}
//emlist[例 Net::HTTPHeaderSyntaxError][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP:... -
Net
:: HTTPHeader # set _ form _ data(params , sep = & # 39;&& # 39;) -> () (25.0) -
HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。
...URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} # => {"q"=>["ruby", "perl"], "lang"=>"en"}
//}
//emlist[例 set_form_data][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.htm... -
CSV
# convert {|field , field _ info| . . . } (19.0) -
引数 name で指定した変換器かブロックに各フィールドを渡して文字列から別 のオブジェクトへと変換します。
...ue)
csv.convert do |field,field_info|
p field
p field_info
Date.parse(field)
end
p csv.first
# => "2018-07-09"
# => <struct CSV::FieldInfo index=0, line=2, header="date1">
# => "2018-07-10"
# => #<struct CSV::FieldInfo index=1, line=2, header="date2">
# => #<CSV::Row "date1":#<Date: 2018-07-0... -
CSV
# convert {|field| . . . } (19.0) -
引数 name で指定した変換器かブロックに各フィールドを渡して文字列から別 のオブジェクトへと変換します。
...ue)
csv.convert do |field,field_info|
p field
p field_info
Date.parse(field)
end
p csv.first
# => "2018-07-09"
# => <struct CSV::FieldInfo index=0, line=2, header="date1">
# => "2018-07-10"
# => #<struct CSV::FieldInfo index=1, line=2, header="date2">
# => #<CSV::Row "date1":#<Date: 2018-07-0...