60件ヒット
[1-60件を表示]
(0.019秒)
別のキーワード
種類
- インスタンスメソッド (36)
- 特異メソッド (12)
- 定数 (12)
ライブラリ
- csv (60)
キーワード
-
DEFAULT
_ OPTIONS (12) -
force
_ quotes? (12) - inspect (12)
- new (12)
-
quote
_ char (12)
検索結果
先頭5件
-
CSV
# quote _ char -> String (6114.0) -
フィールドをクオートするのに使用する文字列を返します。
...フィールドをクオートするのに使用する文字列を返します。
//emlist[例][ruby]{
require "csv"
csv = CSV.new("header1,header2\nrow1_1,row1_2", quote_char: "'")
csv.quote_char # => "'"
//}
@see CSV.new... -
CSV
# force _ quotes? -> bool (6101.0) -
出力される全てのフィールドがクオートされる場合は、真を返します。
...]{
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... -
CSV
. new(data , options = Hash . new) -> CSV (31.0) -
このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。
...このメソッドは CSV ファイルを読み込んだり、書き出したりするために
String か IO のインスタンスをラップします。
ラップされた文字列の先頭から読み込むことになります。
文字列に追記したい場合は CSV.generate を使用し......ンスを指定します。
String のインスタンスを指定した場合、CSV#string を使用して
後からデータを取り出すことが出来ます。
@param options CSV をパースするためのオプションをハッシュで指定します。......とき
データの先頭から次の "\r\n", "\n", "\r" の並びまでを読みます。
A sequence will be selected even if it occurs in a quoted field, assuming that you
would have the same line endings there. If none of those sequences is
found, +data+ is ARGF, Object::STDIN, Object::S... -
CSV
# inspect -> String (7.0) -
ASCII 互換文字列で自身の情報を表したものを返します。
...ASCII 互換文字列で自身の情報を表したものを返します。
//emlist[例][ruby]{
require "csv"
csv = CSV.new("header1,header2\nrow1_1,row1_2")
csv.inspect # => "<#CSV io_type:StringIO encoding:UTF-8 lineno:0 col_sep:\",\" row_sep:\"\\n\" quote_char:\"\\\"\">"
//}... -
CSV
:: DEFAULT _ OPTIONS -> Hash (7.0) -
このオプションは呼び出し側で上書きしなかったときに使用するオプションです。
...るオプションです。
: :col_sep
","
: :row_sep
:auto
: :quote_char
'"'
: :field_size_limit
nil
: :converters
nil
: :unconverted_fields
nil
: :headers
false
: :return_headers
false
: :header_converters
nil
: :skip_blanks
false
: :force_quotes
false
: :skip_lines
nil...