るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.039秒)
トップページ > クエリ:read[x] > クエリ:header_converters[x]

別のキーワード

  1. csv header_convert
  2. csv header_row?
  3. mkmf have_header
  4. csv header_converters
  5. cgi header

ライブラリ

クラス

キーワード

検索結果

CSV#header_converters -> Array (18119.0)

現在有効なヘッダ用変換器のリストを返します。

...ェクトを返します。

//emlist[例][ruby]{
require "csv"

csv = CSV.new("HEADER1,HEADER2\nrow1_1,row1_2", headers: true, header_converters: CSV::HeaderConverters.keys)
csv.header_converters # => [:downcase, :symbol]
csv.read.to_a # => header2], ["row1_1", "row1_2"
//}

@see CSV.new...

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

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

...f this
feature will be used as the line-ending translation can cause
problems with resetting the document position to where it was before the
read
ahead. This String will be transcoded into the data's Encoding before parsing.
: :quote_char
フィールドをクオートする文字を指...
...ータのエンコーディングに変換されます。
: :field_size_limit
This is a maximum size CSV will read ahead looking for 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...
...スとして返します。
: :write_headers
真を指定して :headers にも値をセットすると、ヘッダを出力します。
: :header_converters
:converters オプションに似ていますが、ヘッダ専用の変換器を定義します。
全ての組み込みの変換器は...

CSV.table(path, options = Hash.new) -> CSV::Table | [Array] (18.0)

以下と同等のことを行うメソッドです。

...以下と同等のことを行うメソッドです。

//emlist[][ruby]{
CSV.read( path, { headers: true,
converters: :numeric,
header_converters
: :symbol }.merge(options) )
//}

@param path ファイル名を指定します。

@param options C...
...SV.new のオプションと同じオプションを指定できます。


@see CSV.read...