2件ヒット
[1-2件を表示]
(0.010秒)
ライブラリ
- csv (2)
キーワード
- truncate (1)
-
unconverted
_ fields? (1)
検索結果
-
CSV
# truncate(path , length) -> 0 (18307.0) -
File#truncate に委譲します。
File#truncate に委譲します。
@see File#truncate -
CSV
# unconverted _ fields? -> bool (18307.0) -
パースした結果が unconverted_fields というメソッドを持つ場合に真を返します。 そうでない場合は、偽を返します。
...ます。
//emlist[例][ruby]{
require "csv"
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10")
csv.unconverted_fields? # => nil
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", unconverted_fields: false)
csv.unconverted_fields? # => false
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", h......_fields: true)
csv.unconverted_fields? # => true
csv.convert(:date)
row = csv.readline
row.fields # => [#<Date: 2018-07-09 ((2458309j,0s,0n),+0s,2299161j)>, #<Date: 2018-07-10 ((2458310j,0s,0n),+0s,2299161j)>]
row.unconverted_fields # => ["2018-07-09", "2018-07-10"]
//}
@see CSV.new...