るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.073秒)
トップページ > クエリ:t[x] > クエリ:ruby[x] > クラス:CSV[x] > ライブラリ:csv[x] > 種類:インスタンスメソッド[x] > クエリ:force_quotes?[x]

別のキーワード

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

検索結果

CSV#force_quotes? -> bool (24229.0)

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

...st[例][ruby]{
require "csv"

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

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

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

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

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

@see CSV.new...