るりまサーチ

最速Rubyリファレンスマニュアル検索!
374件ヒット [1-100件を表示] (0.164秒)
トップページ > クエリ:-[x] > クエリ:r[x] > クエリ:parse[x] > クエリ:header[x] > クエリ:new[x]

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils chmod_r
  5. fileutils rm_r

ライブラリ

クラス

モジュール

検索結果

<< 1 2 3 ... > >>

CSV::FieldInfo#header -> String | nil (24367.0)

利用可能な場合はヘッダを表す文字列を返します。

...ます。

//emlist[例][ruby]{
r
equire 'csv'

csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", headers: true)
csv.convert do |field,field_info|
p field_info.header
Date.parse(field)
end
p csv.first

# => "date1"
# => "date2"
# => #<CSV::Row "date1":#<Date: 2018-07-09 ((2458309j,0s,0n),+0s,22...
...99161j)> "date2":#<Date: 2018-07-10 ((2458310j,0s,0n),+0s,2299161j)>>
//}...

CSV.new(data, options = Hash.new) -> CSV (18368.0)

このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。

...読み込んだり、書き出したりするために
String か IO のインスタンスをラップします。

ラップされた文字列の先頭から読み込むことになります。
文字列に追記したい場合は CSV.generate を使用してください。
他の位置から処理...
...or the stream is only available for output, the default
$INPUT_RECORD_SEPARATOR ($/) is used. Obviously,
discovery takes a little time. Set manually if speed is important. Also
note that IO objects should be opened in binary mode on Windows if this
feature will be used as the line-e...
...r the closing quote
for a field. (In truth, it reads to the first line ending beyond this
size.) If a quote cannot be found within the limit CSV will raise a
MalformedCSVError, assuming the data is faulty. You can use this limit to
prevent what are effectively DoS attacks on the parse...

Net::HTTPHeader#each_header {|name, val| .... } -> () (12331.0)

保持しているヘッダ名とその値をそれぞれ ブロックに渡して呼びだします。

...mlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/index.html')
r
eq = Net::HTTP::Get.new(uri.request_uri)
r
eq.each_header { |key,value| puts "#{key} = #{value}" }

# => accept-encoding = gzip;q=1.0,deflate;q=0.6,identity;q=0.3
# => accept = */*
# => user-agent = Ruby
//}...

ruby 1.6 feature (11592.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...ruby 1.6 feature
r
uby version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。

((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。

== 1.6.8 (2002-12-24) ->...
...
した((<ruby-talk:40337>)), ((<ruby-core:00019>))

: 2002-09-11: Queue#((<Queue/pop>))

Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))

: 2002-09-11: SizedQueue.new

引数に 0 以下を受けつけるバグが修正されました。

: 2002-09-05: ((<リテ...
...どは、1.7
とは異なります。(((<ruby 1.7 feature>)) の 2002-06-24 も参照)

p "#{ "" # comment }"
=> ruby 1.6.8 (2002-10-04) [i586-linux]
""
=> -:1: parse error
r
uby 1.7.3 (2002-10-04) [i586-linux]

: SizedQueue#deq, #shift
: SizedQueue#en...

Net::HTTPHeader#content_range -> Range|nil (9340.0)

Content-Range: ヘッダフィールドの値を Range で返します。 Range の表わす長さは Net::HTTPHeader#range_length で得られます。

...Content-Range: ヘッダフィールドの値を Range で返します。
R
ange の表わす長さは Net::HTTPHeader#range_length で得られます。

ヘッダが設定されていない場合には nil を返します。

//emlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.exa...
...mple.com/index.html')
r
eq = Net::HTTP::Get.new(uri.request_uri)
r
eq.content_range # => nil
r
eq['Content-Range'] = "bytes 0-499/1234"
r
eq.content_range # => 0..499
//}...

絞り込み条件を変える

Net::HTTPHeader#range -> Range|nil (9330.0)

Range: ヘッダの示す範囲を Range オブジェクトで返します。

...
R
ange: ヘッダの示す範囲を Range オブジェクトで返します。

ヘッダにない場合は nil を返します。

@raise Net::HTTPHeaderSyntaxError Range:ヘッダの中身が規格通り
でない場合に発生します。

//emlist[例 正常な...
...[ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/index.html')
r
eq = Net::HTTP::Get.new(uri.request_uri)
r
eq['range'] = "bytes=1-5"
r
eq.range # => [1..5]
//}

//emlist[例 Net::HTTPHeaderSyntaxError][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/index.html')
r
e...
...q = Net::HTTP::Get.new(uri.request_uri)
r
eq['range'] = "invalid"
r
eq.range # => Net::HTTPHeaderSyntaxError
//}...

Net::HTTPHeader#set_form_data(params, sep = &#39;&&#39;) -> () (9266.0)

HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。

...ームのデータ params から
ヘッダフィールドとボディを設定します。

ヘッダフィールド Content-Type: には
'application/x-www-form-urlencoded' が設定されます。

@param params HTML のフォームデータの Hash を与えます。
@param sep データのセパ...
...rm_data][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/index.html')
r
eq = Net::HTTP::Get.new(uri.request_uri)
r
eq.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} # => {"q"=>["ruby", "perl"], "lang"=>"en"}
//}

//emlist[例 set_form_data][ruby]{
r
equire 'net/http'

uri = UR...
...I.parse('http://www.example.com/index.html')
r
eq = Net::HTTP::Get.new(uri.request_uri)
r
eq.set_form_data({"q" => "ruby", "lang" => "en"}, ';') # => "application/x-www-form-urlencoded"
//}...

Net::HTTPHeader#range_length -> Integer|nil (9246.0)

Content-Range: ヘッダフィールドの表している長さを整数で返します。

...Content-Range: ヘッダフィールドの表している長さを整数で返します。

ヘッダが設定されていない場合には nil を返します。

@raise Net::HTTPHeaderSyntaxError Content-Range: ヘッダフィールド
の値が不正である...
...発生します。


//emlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/index.html')
r
eq = Net::HTTP::Get.new(uri.request_uri)
r
eq['Content-Range'] = "bytes 1-500/1000"
r
eq.range_length # => 500
//}...

Net::HTTPHeader#proxy_basic_auth(account, password) -> [String] (9228.0)

Proxy 認証のために Proxy-Authorization: ヘッダをセットします。

...Proxy 認証のために Proxy-Authorization: ヘッダをセットします。

@param account アカウント名を文字列で与えます。
@param password パスワードを文字列で与えます。

//emlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/index.html...
...')
r
eq = Net::HTTP::Get.new(uri.request_uri)
r
eq.proxy_basic_auth("account", "password") # => ["Basic YWNjb3VudDpwYXNzd29yZA=="]
//}...

Net::HTTPHeader#form_data=(params) (9166.0)

HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。

...ームのデータ params から
ヘッダフィールドとボディを設定します。

ヘッダフィールド Content-Type: には
'application/x-www-form-urlencoded' が設定されます。

@param params HTML のフォームデータの Hash を与えます。
@param sep データのセパ...
...rm_data][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/index.html')
r
eq = Net::HTTP::Get.new(uri.request_uri)
r
eq.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} # => {"q"=>["ruby", "perl"], "lang"=>"en"}
//}

//emlist[例 set_form_data][ruby]{
r
equire 'net/http'

uri = UR...
...I.parse('http://www.example.com/index.html')
r
eq = Net::HTTP::Get.new(uri.request_uri)
r
eq.set_form_data({"q" => "ruby", "lang" => "en"}, ';') # => "application/x-www-form-urlencoded"
//}...

絞り込み条件を変える

<< 1 2 3 ... > >>