るりまサーチ

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

別のキーワード

  1. process abort
  2. process setrlimit
  3. process fork
  4. tracer display_process_id?
  5. tracer display_process_id

検索結果

CSV (14.0)

このクラスは CSV ファイルやデータに対する完全なインターフェイスを提供します。

... CSV ファイルやデータに対する完全なインターフェイスを提供します。

=== 読み込み

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

csv
_text = <<~CSV_TEXT
Ruby,1995
Rust,2010
CSV
_TEXT

IO.write "sample.csv", csv_text

# ファイルから一行ずつ
CSV
.foreach("sample.csv")...
.... Hopefully this
makes the entire process feel transparent, since CSV's defaults should just
magically work for you data. However, you can set these values manually in
the target Encoding to avoid the translation.

It's also important to note that while all of CSV's core parser is now
Encoding agn...
...objects
passed into CSV have the proper Encoding set and everything should just work.
CSV
methods that allow you to open IO objects (CSV::foreach(), CSV::open(),
CSV
::read(), and CSV::readlines()) do allow you to specify the Encoding.

One minor exception comes when generating CSV into a String with...