るりまサーチ

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

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. kernel p
  5. matrix p

検索結果

Gem::Package::TarWriter::BoundedStream#written -> Integer (21101.0)

既に書き込んだデータのサイズを返します。

既に書き込んだデータのサイズを返します。

CSV (30.0)

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

....write "sample.csv", csv_text

# ファイルから一行ずつ
CSV.foreach("sample.csv") do |row|
p
row
end
# => ["Ruby", "1995"]
# ["Rust", "2010"]

# ファイルから一度に
p
CSV.read("sample.csv")
# => [["Ruby", "1995"], ["Rust", "2010"]]

# 文字列から一行ずつ
CSV.parse(csv_te...
...xt) do |row|
p
row
end
# => ["Ruby", "1995"]
# ["Rust", "2010"]

# 文字列から一度に
p
CSV.parse(csv_text)
# => [["Ruby", "1995"], ["Rust", "2010"]]
//}

=== 書き込み

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

# ファイルへ書き込み
CSV.open("path/to/file.csv", "wb") do |csv|
csv <<...
...(M17n or Multilingualization)

This new CSV parser is m17n savvy. The parser works in the Encoding of the IO
or String object being read from or written to. Your data is never transcoded
(unless you ask Ruby to transcode it for you) and will literally be parsed in
the Encoding it is in. Thus CSV...