るりまサーチ

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

別のキーワード

  1. csv force_quotes?
  2. string force_encoding
  3. lazy force
  4. options force_output
  5. options force_update

ライブラリ

クラス

検索結果

CSV#force_quotes? -> bool (24313.0)

出力される全てのフィールドがクオートされる場合は、真を返します。

...][ruby]{
r
equire "csv"

r
ows = [["header1", "header2"], ["row1_1,", "row1_2"]]
r
esult = CSV.generate(force_quotes: false) do |csv|
r
ows.each { |row| csv << row }
csv.force_quotes? # => false
end
print result

# => header1,header2
# "row1_1,",row1_2
//}

//emlist[例][ruby]{
r
equire "csv"

r
ow...
...s = [["header1", "header2"], ["row1_1,", "row1_2"]]
r
esult = CSV.generate(force_quotes: true) do |csv|
r
ows.each { |row| csv << row }
csv.force_quotes? # => true
end
print result

# => true
# => "header1","header2"
# "row1_1,","row1_2"
//}

@see CSV.new...