るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.035秒)

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file ctime
  4. file atime
  5. file size

クラス

検索結果

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

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

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

ラップされた文字列の先頭から読み込むことになります。
文字列に追記したい場合は CSV.generate を使用し...
...ct::STDERR, 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...
...ise CSV::MalformedCSVError 不正な CSV をパースしようとしたときに発生します。

//emlist[例: ファイルの読み込み][ruby]{
require "csv"

users =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

File
.write("test.csv",...