624件ヒット
[1-100件を表示]
(0.079秒)
クラス
- CSV (36)
-
CSV
:: FieldInfo (12) -
Net
:: HTTPGenericRequest (96) -
Net
:: HTTPResponse (108) -
Psych
:: Parser :: Mark (12)
モジュール
-
Net
:: HTTPHeader (360)
キーワード
- [] (12)
- []= (12)
-
basic
_ auth (12) - body (24)
- body= (12)
-
body
_ stream (12) -
body
_ stream= (12) - chunked? (12)
- code (12)
-
content
_ length (12) -
content
_ length= (12) -
content
_ range (12) -
content
_ type= (12) - convert (36)
- delete (12)
- each (12)
-
each
_ capitalized _ name (12) -
each
_ header (12) -
each
_ key (12) -
each
_ name (12) -
each
_ value (12) - entity (12)
- fetch (36)
-
form
_ data= (12) -
get
_ fields (12) -
http
_ version (12) - key? (12)
-
main
_ type (12) - method (24)
- msg (12)
- path (12)
-
proxy
_ basic _ auth (12) - range (12)
-
range
_ length (12) -
read
_ body (24) -
request
_ body _ permitted? (12) -
response
_ body _ permitted? (12) -
set
_ content _ type (12) -
set
_ form _ data (12) -
sub
_ type (12) -
type
_ params (12) - value (12)
検索結果
先頭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...