diff --git a/NEWS_md.html b/NEWS_md.html index b624512..df25d86 100644 --- a/NEWS_md.html +++ b/NEWS_md.html @@ -61,6 +61,9 @@
CSV.open
: Changed to detect BOM by default. Note that this isn't enabled on Windows because Ruby may have a bug. See also: bugs.ruby-lang.org/issues/20526
GH-301
+Reported by Junichi Ito
+GH-301
+Reported by Junichi Ito
+Improved performance.
+GH-311
+GH-312
+Patch by Vladimir Kochnev
+CSV.open
: Added support for StringIO
as an input.
GH-300
+GH-302
+Patch by Marcelo
+Added a built-in time converter. You can use it by converters: :time
.
GH-313
+Patch by Bart de Water
+Added CSV::TSV
for tab-separated values.
GH-272
+GH-319
+Reported by kojix2
+Patch by Jas
+Junichi Ito
+Vladimir Kochnev
+Marcelo
+Bart de Water
+kojix2
+Jas
+CSV\n
CSV Data\n
CSV (comma-separated values) data is a text representation of a table:\n"],["CSV::FieldsConverter","","CSV/FieldsConverter.html","","
Note: Don't use this class directly. This is an internal class.\n"],["CSV::InputRecordSeparator","","CSV/InputRecordSeparator.html","",""],["CSV::InvalidEncodingError","","CSV/InvalidEncodingError.html","","
The error thrown when the parser encounters invalid encoding in CSV.\n"],["CSV::MalformedCSVError","","CSV/MalformedCSVError.html","","
The error thrown when the parser encounters illegal CSV formatting.\n"],["CSV::Parser","","CSV/Parser.html","","
Note: Don't use this class directly. This is an internal class.\n"],["CSV::Parser::InputsScanner","","CSV/Parser/InputsScanner.html","","
CSV::InputsScanner receives IO inputs, encoding and the chunk_size. It also controls the life cycle of …\n"],["CSV::Parser::InvalidEncoding","","CSV/Parser/InvalidEncoding.html","","
Raised when encoding is invalid.\n"],["CSV::Parser::Scanner","","CSV/Parser/Scanner.html","","
CSV::Scanner receives a CSV output, scans it and return the content. It also controls the life cycle …\n"],["CSV::Parser::UnexpectedError","","CSV/Parser/UnexpectedError.html","","
Raised when unexpected case is happen.\n"],["CSV::Row","","CSV/Row.html","","
CSV::Row\n
A CSV::Row instance represents a CSV table row. (see class CSV).\n
The instance may have:\n"],["CSV::TSV","","CSV/TSV.html","",""],["CSV::Table","","CSV/Table.html","","
CSV::Table\n
A CSV::Table instance represents CSV data. (see class CSV).\n
The instance may have:\n"],["CSV::Writer","","CSV/Writer.html","","
Note: Don't use this class directly. This is an internal class.\n"],["Object","","Object.html","",""],["String","","String.html","",""],["<<","CSV","CSV.html#method-i-3C-3C","(row)","
Appends a row to self
.\n
Argument row
must be an Array object or a CSV::Row object.\n
The output stream must …\n"],["<<","CSV::Row","CSV/Row.html#method-i-3C-3C","(arg)","
Adds a field to self
; returns self
:\n
If the argument is a 2-element Array [header, value]
, a field is added …\n"],["<<","CSV::Table","CSV/Table.html#method-i-3C-3C","(row_or_array)","
If row_or_array
is a CSV::Row object, it is appended to the table:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["<<","CSV::Writer","CSV/Writer.html#method-i-3C-3C","(row)","
Adds a new row\n"],["==","CSV::Row","CSV/Row.html#method-i-3D-3D","(other)","
Returns true
if other
is a /CSV::Row that has the same fields (headers and values) in the same order …\n"],["==","CSV::Table","CSV/Table.html#method-i-3D-3D","(other)","
Returns true
if all each row of self
==
the corresponding row of other_table
, otherwise, false
.\n
The access …\n"],["CSV","Object","Object.html#method-i-CSV","(*args, **options, &block)","
Passes args
to CSV::instance.\n\n
CSV("CSV,data").read\n #=> [["CSV", "data"]]\n\n
If a block is given, the instance …\n"],["[]","CSV::Row","CSV/Row.html#method-i-5B-5D","(header_or_index, minimum_index = 0)",""],["[]","CSV::Table","CSV/Table.html#method-i-5B-5D","(index_or_header)","
Returns data from the table; does not modify the table.\n
Fetch a Row by Its Integer Index — \n
Form: table[n]
…\n"],["[]=","CSV::Row","CSV/Row.html#method-i-5B-5D-3D","(*args)","
Assigns the field value for the given index
or header
; returns value
.\n
Assign field value by Integer index: …\n"],["[]=","CSV::Table","CSV/Table.html#method-i-5B-5D-3D","(index_or_header, value)","
Puts data onto the table.\n
Set a Row by Its Integer Index — \n
Form: table[n] = row
, n
an Integer, row
a CSV::Row …\n"],["add_converter","CSV::FieldsConverter","CSV/FieldsConverter.html#method-i-add_converter","(name=nil, &converter)",""],["add_row","CSV","CSV.html#method-i-add_row","(row)",""],["binmode?","CSV","CSV.html#method-i-binmode-3F","()",""],["by_col","CSV::Table","CSV/Table.html#method-i-by_col","()","
Returns a duplicate of self
, in column mode (see Column Mode):\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["by_col!","CSV::Table","CSV/Table.html#method-i-by_col-21","()","
Sets the mode for self
to column mode (see Column Mode); returns self
:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["by_col_or_row","CSV::Table","CSV/Table.html#method-i-by_col_or_row","()","
Returns a duplicate of self
, in mixed mode (see Mixed Mode):\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["by_col_or_row!","CSV::Table","CSV/Table.html#method-i-by_col_or_row-21","()","
Sets the mode for self
to mixed mode (see Mixed Mode); returns self
:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["by_row","CSV::Table","CSV/Table.html#method-i-by_row","()","
Returns a duplicate of self
, in row mode (see Row Mode):\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["by_row!","CSV::Table","CSV/Table.html#method-i-by_row-21","()","
Sets the mode for self
to row mode (see Row Mode); returns self
:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["check","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-check","(pattern)",""],["col_sep","CSV","CSV.html#method-i-col_sep","()","
Returns the encoded column separator; used for parsing and writing; see Option col_sep:\n\n
CSV.new('').col_sep ...\n\n"],["column_separator","CSV::Parser","CSV/Parser.html#method-i-column_separator","()",""],["convert","CSV","CSV.html#method-i-convert","(name = nil, &converter)","
With no block, installs a field converter (a Proc).\n
With a block, defines and installs a custom field …\n"],["convert","CSV::FieldsConverter","CSV/FieldsConverter.html#method-i-convert","(fields, headers, lineno, quoted_fields=NO_QUOTED_FIELDS)",""],["converters","CSV","CSV.html#method-i-converters","()","
Returns an Array containing field converters; see Field Converters:\n\n
csv = CSV.new('')\ncsv.converters # ...\n\n"],["deconstruct","CSV::Row","CSV/Row.html#method-i-deconstruct","()","
Returns the new Array suitable for pattern matching containing the values of the row.\n"],["deconstruct_keys","CSV::Row","CSV/Row.html#method-i-deconstruct_keys","(keys)","
Returns the new Hash suitable for pattern matching containing only the keys specified as an argument. …\n"],["delete","CSV::Row","CSV/Row.html#method-i-delete","(header_or_index, minimum_index = 0)","
Removes a specified field from self
; returns the 2-element Array [header, value]
if the field exists. …\n"],["delete","CSV::Table","CSV/Table.html#method-i-delete","(*indexes_or_headers)","
If the access mode is :row
or :col_or_row
, and each argument is either an Integer or a Range, returns …\n"],["delete_if","CSV::Row","CSV/Row.html#method-i-delete_if","(&block)","
Removes fields from self
as selected by the block; returns self
.\n
Removes each field for which the block …\n"],["delete_if","CSV::Table","CSV/Table.html#method-i-delete_if","(&block)","
Removes rows or columns for which the block returns a truthy value; returns self
.\n
Removes rows when the …\n"],["dig","CSV::Row","CSV/Row.html#method-i-dig","(index_or_header, *indexes)","
Finds and returns the object in nested object that is specified by index_or_header
and specifiers
.\n
The …\n"],["dig","CSV::Table","CSV/Table.html#method-i-dig","(index_or_header, *index_or_headers)","
Extracts the nested value specified by the sequence of index
or header
objects by calling dig at each …\n"],["each","CSV","CSV.html#method-i-each","(&block)","
Calls the block with each successive row. The data source must be opened for reading.\n
Without headers: …\n"],["each","CSV::FieldsConverter","CSV/FieldsConverter.html#method-i-each","(&block)",""],["each","CSV::Row","CSV/Row.html#method-i-each","(&block)","
Calls the block with each header-value pair; returns self
:\n\n
source = "Name,Name,Name\\nFoo,Bar,Baz\\n"\ntable ...\n\n"],["each","CSV::Table","CSV/Table.html#method-i-each","(&block)","
Calls the block with each row or column; returns self
.\n
When the access mode is :row
or :col_or_row
, calls …\n"],["each_line","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-each_line","(row_separator)",""],["each_line","CSV::Parser::Scanner","CSV/Parser/Scanner.html#method-i-each_line","(row_separator)",""],["each_pair","CSV::Row","CSV/Row.html#method-i-each_pair","(&block)",""],["empty?","CSV::FieldsConverter","CSV/FieldsConverter.html#method-i-empty-3F","()",""],["eof","CSV","CSV.html#method-i-eof","()",""],["eof?","CSV","CSV.html#method-i-eof-3F","()",""],["eos?","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-eos-3F","()",""],["fetch","CSV::Row","CSV/Row.html#method-i-fetch","(header, *varargs)","
Returns the field value as specified by header
.\n
With the single argument header
, returns the field value …\n"],["field","CSV::Row","CSV/Row.html#method-i-field","(header_or_index, minimum_index = 0)","
Returns the field value for the given index
or header
.\n
Fetch field value by Integer index:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["field?","CSV::Row","CSV/Row.html#method-i-field-3F","(data)","
Returns true
if value
is a field in this row, false
otherwise:\n\n
source = "Name,Name,Name\\nFoo,Bar,Baz\\n" ...\n\n"],["field_row?","CSV::Row","CSV/Row.html#method-i-field_row-3F","()","
Returns true
if this is a field row, false
otherwise.\n"],["field_size_limit","CSV","CSV.html#method-i-field_size_limit","()","
Returns the limit for field size; used for parsing; see Option field_size_limit:\n\n
CSV.new('').field_size_limit ...\n\n"],["field_size_limit","CSV::Parser","CSV/Parser.html#method-i-field_size_limit","()",""],["fields","CSV::Row","CSV/Row.html#method-i-fields","(*headers_and_or_indices)","
Returns field values per the given specifiers
, which may be any mixture of:\n
Integer index.\n
Range of Integer …\n"],["filter","CSV","CSV.html#method-c-filter","(input=nil, output=nil, **options)","
Parses CSV from a source (String, IO stream, or ARGF).\n
Calls the given block with each parsed row:\n
Without …\n"],["flock","CSV","CSV.html#method-i-flock","(*args)",""],["force_quotes?","CSV","CSV.html#method-i-force_quotes-3F","()","
Returns the value that determines whether all output fields are to be quoted; used for generating; see …\n"],["foreach","CSV","CSV.html#method-c-foreach","(path, mode=\"r\", **options, &block)","
Calls the block with each row read from source path_or_io
.\n
Path input without headers:\n\n
string = "foo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["generate","CSV","CSV.html#method-c-generate","(str=nil, **options)","
Argument csv_string
, if given, must be a String object; defaults to a new empty String.\n
Arguments options
…\n\n"],["generate_line","CSV","CSV.html#method-c-generate_line","(row, **options)","
Returns the String created by generating CSV from ary
using the specified options
.\n
Argument ary
must be …\n"],["generate_lines","CSV","CSV.html#method-c-generate_lines","(rows, **options)","
Returns the String created by generating CSV from using the specified options
.\n
Argument rows
must be an …\n"],["gets","CSV","CSV.html#method-i-gets","()",""],["has_key?","CSV::Row","CSV/Row.html#method-i-has_key-3F","(header)","
Returns true
if there is a field with the given header
, false
otherwise.\n"],["header?","CSV::Row","CSV/Row.html#method-i-header-3F","(header)",""],["header_convert","CSV","CSV.html#method-i-header_convert","(name = nil, &converter)","
The block need not return a String object:\n\n
csv = CSV.open(path, headers: true)\ncsv.header_convert {|header, ...\n"],["header_converters","CSV","CSV.html#method-i-header_converters","()","
Returns an Array containing header converters; used for parsing; see Header Converters:\n\n
CSV.new('').header_converters ...\n\n"],["header_row?","CSV","CSV.html#method-i-header_row-3F","()","
Returns true
if the next row to be read is a header row; false
otherwise.\n
Without headers:\n\n
string = "foo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["header_row?","CSV::Parser","CSV/Parser.html#method-i-header_row-3F","()",""],["header_row?","CSV::Row","CSV/Row.html#method-i-header_row-3F","()","
Returns true
if this is a header row, false
otherwise.\n"],["headers","CSV","CSV.html#method-i-headers","()","
Returns the value that determines whether headers are used; used for parsing; see Option headers:\n\n
CSV.new('').headers ...\n\n"],["headers","CSV::Parser","CSV/Parser.html#method-i-headers","()",""],["headers","CSV::Row","CSV/Row.html#method-i-headers","()","
Returns the headers for this row:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n"\ntable = CSV.parse(source, ...\n"],["headers","CSV::Table","CSV/Table.html#method-i-headers","()","
Returns a new Array containing the String headers for the table.\n
If the table is not empty, returns the …\n"],["include?","CSV::Row","CSV/Row.html#method-i-include-3F","(header)",""],["index","CSV::Row","CSV/Row.html#method-i-index","(header, minimum_index = 0)","
Returns the index for the given header, if it exists; otherwise returns nil
.\n
With the single argument …\n"],["initialize_copy","CSV::Row","CSV/Row.html#method-i-initialize_copy","(other)","
Calls superclass method.\n"],["inspect","CSV","CSV.html#method-i-inspect","()","
Returns a String showing certain properties of self
:\n\n
string = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n"\ncsv ...\n\n"],["inspect","CSV::Row","CSV/Row.html#method-i-inspect","()","
Returns an ASCII-compatible String showing:\n
Class CSV::Row.\n
Header-value pairs.\n"],["inspect","CSV::Table","CSV/Table.html#method-i-inspect","()","
Returns a US-ASCII
-encoded String showing table:\n
Class: CSV::Table
.\n
Access mode: :row
, :col
, or :col_or_row
…\n"],["instance","CSV","CSV.html#method-c-instance","(data = $stdout, **options)","
Creates or retrieves cached CSV objects. For arguments and options, see CSV.new.\n
This API is not Ractor-safe. …\n"],["ioctl","CSV","CSV.html#method-i-ioctl","(*args)",""],["keep_back","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-keep_back","()",""],["keep_back","CSV::Parser::Scanner","CSV/Parser/Scanner.html#method-i-keep_back","()",""],["keep_drop","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-keep_drop","()",""],["keep_drop","CSV::Parser::Scanner","CSV/Parser/Scanner.html#method-i-keep_drop","()",""],["keep_end","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-keep_end","()",""],["keep_end","CSV::Parser::Scanner","CSV/Parser/Scanner.html#method-i-keep_end","()",""],["keep_start","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-keep_start","()",""],["keep_start","CSV::Parser::Scanner","CSV/Parser/Scanner.html#method-i-keep_start","()",""],["key?","CSV::Row","CSV/Row.html#method-i-key-3F","(header)",""],["liberal_parsing?","CSV","CSV.html#method-i-liberal_parsing-3F","()","
Returns the value that determines whether illegal input is to be handled; used for parsing; see Option …\n"],["liberal_parsing?","CSV::Parser","CSV/Parser.html#method-i-liberal_parsing-3F","()",""],["line","CSV","CSV.html#method-i-line","()","
Returns the line most recently read:\n\n
string = "foo,0\\nbar,1\\nbaz,2\\n"\npath = 't.csv'\nFile.write(path, ...\n"],["line","CSV::Parser","CSV/Parser.html#method-i-line","()",""],["lineno","CSV","CSV.html#method-i-lineno","()","
Returns the count of the rows parsed or generated.\n
Parsing:\n\n
string = "foo,0\\nbar,1\\nbaz,2\\n"\npath = 't.csv' ...\n\n"],["lineno","CSV::Parser","CSV/Parser.html#method-i-lineno","()",""],["max_field_size","CSV","CSV.html#method-i-max_field_size","()","
Returns the limit for field size; used for parsing; see Option max_field_size:\n\n
CSV.new('').max_field_size ...\n\n"],["max_field_size","CSV::Parser","CSV/Parser.html#method-i-max_field_size","()",""],["member?","CSV::Row","CSV/Row.html#method-i-member-3F","(header)",""],["new","CSV","CSV.html#method-c-new","(data, col_sep: \",\", row_sep: :auto, quote_char: '\"', field_size_limit: nil, max_field_size: nil, converters: nil, unconverted_fields: nil, headers: false, return_headers: false, write_headers: nil, header_converters: nil, skip_blanks: false, force_quotes: false, skip_lines: nil, liberal_parsing: false, internal_encoding: nil, external_encoding: nil, encoding: nil, nil_value: nil, empty_value: \"\", strip: false, quote_empty: true, write_converters: nil, write_nil_value: nil, write_empty_value: \"\")","
Returns the new CSV object created using string
or io
and the specified options
.\n
Argument string
should …\n"],["new","CSV::FieldsConverter","CSV/FieldsConverter.html#method-c-new","(options={})","
A CSV::FieldsConverter is a data structure for storing the fields converter properties to be passed as …\n"],["new","CSV::InvalidEncodingError","CSV/InvalidEncodingError.html#method-c-new","(encoding, line_number)",""],["new","CSV::MalformedCSVError","CSV/MalformedCSVError.html#method-c-new","(message, line_number)",""],["new","CSV::Parser","CSV/Parser.html#method-c-new","(input, options)",""],["new","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-c-new","(inputs, encoding, row_separator, chunk_size: 8192)",""],["new","CSV::Parser::Scanner","CSV/Parser/Scanner.html#method-c-new","(*args)",""],["new","CSV::Row","CSV/Row.html#method-c-new","(headers, fields, header_row = false)","
Returns the new CSV::Row instance constructed from arguments headers
and fields
; both should be Arrays …\n"],["new","CSV::TSV","CSV/TSV.html#method-c-new","(data, **options)",""],["new","CSV::Table","CSV/Table.html#method-c-new","(array_of_rows, headers: nil)","
Returns a new CSV::Table object.\n
Argument array_of_rows
must be an Array of CSV::Row objects.\n
Argument …\n"],["new","CSV::Writer","CSV/Writer.html#method-c-new","(output, options)",""],["open","CSV","CSV.html#method-c-open","(filename_or_io, mode=\"r\", **options)","
possible options elements:\n\n
keyword form:\n :invalid => nil # raise error on invalid byte sequence ...\n"],["parse","CSV","CSV.html#method-c-parse","(str, **options, &block)","
Parses string
or io
using the specified options
.\n
Argument string
should be a String object; it will be …\n"],["parse","CSV::Parser","CSV/Parser.html#method-i-parse","(&block)",""],["parse_csv","String","String.html#method-i-parse_csv","(**options)","
Equivalent to CSV::parse_line(self, options)\n\n
"CSV,data".parse_csv\n #=> ["CSV", "data"]\n\n"],["parse_line","CSV","CSV.html#method-c-parse_line","(line, **options)","
Returns the data created by parsing the first line of string
or io
using the specified options
.\n
Argument …\n"],["path","CSV","CSV.html#method-i-path","()",""],["push","CSV::Row","CSV/Row.html#method-i-push","(*args)","
Appends each of the given values
to self
as a field; returns self
:\n\n
source = "Name,Name,Name\\nFoo,Bar,Baz\\n" ...\n\n"],["push","CSV::Table","CSV/Table.html#method-i-push","(*rows)","
A shortcut for appending multiple rows. Equivalent to:\n\n
rows.each {|row| self << row }\n\n
Each argument may …\n"],["puts","CSV","CSV.html#method-i-puts","(row)",""],["quote_char","CSV","CSV.html#method-i-quote_char","()","
Returns the encoded quote character; used for parsing and writing; see Option quote_char:\n\n
CSV.new('').quote_char ...\n\n"],["quote_character","CSV::Parser","CSV/Parser.html#method-i-quote_character","()",""],["read","CSV","CSV.html#method-c-read","(path, **options)","
Opens the given source
with the given options
(see CSV.open), reads the source (see CSV#read), and returns …\n"],["read","CSV","CSV.html#method-i-read","()","
Forms the remaining rows from self
into:\n
A CSV::Table object, if headers are in use.\n
An Array of Arrays …\n"],["readline","CSV","CSV.html#method-i-readline","()",""],["readlines","CSV","CSV.html#method-c-readlines","(path, **options)","
Alias for CSV.read.\n"],["readlines","CSV","CSV.html#method-i-readlines","()",""],["rest","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-rest","()",""],["return_headers?","CSV","CSV.html#method-i-return_headers-3F","()","
Returns the value that determines whether headers are to be returned; used for parsing; see Option return_headers …\n"],["return_headers?","CSV::Parser","CSV/Parser.html#method-i-return_headers-3F","()",""],["rewind","CSV","CSV.html#method-i-rewind","()","
Rewinds the underlying IO object and resets CSV's lineno() counter.\n"],["rewind","CSV::Writer","CSV/Writer.html#method-i-rewind","()","
Winds back to the beginning\n"],["row_sep","CSV","CSV.html#method-i-row_sep","()","
Returns the encoded row separator; used for parsing and writing; see Option row_sep:\n\n
CSV.new('').row_sep ...\n\n"],["row_separator","CSV::Parser","CSV/Parser.html#method-i-row_separator","()",""],["scan","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-scan","(pattern)",""],["scan_all","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-scan_all","(pattern)",""],["shift","CSV","CSV.html#method-i-shift","()","
Returns the next row of data as:\n
An Array if no headers are used.\n
A CSV::Row object if headers are used. …\n"],["skip_blanks?","CSV","CSV.html#method-i-skip_blanks-3F","()","
Returns the value that determines whether blank lines are to be ignored; used for parsing; see Option …\n"],["skip_blanks?","CSV::Parser","CSV/Parser.html#method-i-skip_blanks-3F","()",""],["skip_lines","CSV","CSV.html#method-i-skip_lines","()","
Returns the Regexp used to identify comment lines; used for parsing; see Option skip_lines:\n\n
CSV.new('').skip_lines ...\n\n"],["skip_lines","CSV::Parser","CSV/Parser.html#method-i-skip_lines","()",""],["stat","CSV","CSV.html#method-i-stat","(*args)",""],["table","CSV","CSV.html#method-c-table","(path, **options)","
Calls CSV.read with source
, options
, and certain default options:\n
headers
: true
\n
converters
: :numeric
\n"],["to_a","CSV::Table","CSV/Table.html#method-i-to_a","()","
Returns the table as an Array of Arrays; the headers are in the first row:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["to_csv","Array","Array.html#method-i-to_csv","(**options)","
Equivalent to CSV::generate_line(self, options)\n\n
["CSV", "data"].to_csv\n #=> "CSV,data\\n"\n\n"],["to_csv","CSV::Row","CSV/Row.html#method-i-to_csv","(**options)","
Returns the row as a CSV String. Headers are not included:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["to_csv","CSV::Table","CSV/Table.html#method-i-to_csv","(write_headers: true, limit: nil, **options)","
Returns the table as CSV string. See Options for Generating.\n
Defaults option write_headers
to true
:\n\n
source ...\n\n"],["to_h","CSV::Row","CSV/Row.html#method-i-to_h","()","
Returns the new Hash formed by adding each header-value pair in self
as a key-value pair in the Hash …\n"],["to_hash","CSV::Row","CSV/Row.html#method-i-to_hash","()",""],["to_i","CSV","CSV.html#method-i-to_i","()",""],["to_io","CSV","CSV.html#method-i-to_io","()",""],["to_s","CSV::Row","CSV/Row.html#method-i-to_s","(**options)",""],["to_s","CSV::Table","CSV/Table.html#method-i-to_s","(write_headers: true, limit: nil, **options)",""],["unconverted_fields?","CSV","CSV.html#method-i-unconverted_fields-3F","()","
Returns the value that determines whether unconverted fields are to be available; used for parsing; see …\n"],["unconverted_fields?","CSV::Parser","CSV/Parser.html#method-i-unconverted_fields-3F","()",""],["use_headers?","CSV::Parser","CSV/Parser.html#method-i-use_headers-3F","()",""],["value","CSV::InputRecordSeparator","CSV/InputRecordSeparator.html#method-c-value","()",""],["values_at","CSV::Row","CSV/Row.html#method-i-values_at","(*headers_and_or_indices)",""],["values_at","CSV::Table","CSV/Table.html#method-i-values_at","(*indices_or_headers)","
If the access mode is :row
or :col_or_row
, and each argument is either an Integer or a Range, returns …\n"],["write_headers?","CSV","CSV.html#method-i-write_headers-3F","()","
Returns the value that determines whether headers are to be written; used for generating; see Option …\n"],["LICENSE","","LICENSE_txt.html","","
Copyright (C) 2005-2016 James Edward Gray II. All rights reserved. Copyright (C) 2007-2017 Yukihiro …\n"],["NEWS","","NEWS_md.html","","
News\n
3.3.0 - 2024-03-22\n
Fixes\n"],["README","","README_md.html","","
CSV\n
This library provides a complete interface to CSV files and data. It offers tools to enable you to …\n"],["filtering","","doc/csv/recipes/filtering_rdoc.html","","
Recipes for Filtering CSV\n
These recipes are specific code examples for specific CSV filtering tasks.\n
For …\n"],["generating","","doc/csv/recipes/generating_rdoc.html","","
Recipes for Generating CSV\n
These recipes are specific code examples for specific CSV generating tasks. …\n"],["parsing","","doc/csv/recipes/parsing_rdoc.html","","
Recipes for Parsing CSV\n
These recipes are specific code examples for specific CSV parsing tasks.\n
For other …\n"],["recipes","","doc/csv/recipes/recipes_rdoc.html","","
Recipes for CSV\n
The recipes are specific code examples for specific tasks. See:\n
Recipes for Parsing CSV …\n"]]}} \ No newline at end of file +var search_data = {"index":{"searchIndex":["array","csv","fieldsconverter","inputrecordseparator","invalidencodingerror","malformedcsverror","parser","inputsscanner","invalidencoding","scanner","unexpectederror","row","tsv","table","writer","object","string","<<()","<<()","<<()","<<()","==()","==()","csv()","[]()","[]()","[]=()","[]=()","add_converter()","add_row()","binmode?()","by_col()","by_col!()","by_col_or_row()","by_col_or_row!()","by_row()","by_row!()","check()","col_sep()","column_separator()","convert()","convert()","converters()","deconstruct()","deconstruct_keys()","delete()","delete()","delete_if()","delete_if()","dig()","dig()","each()","each()","each()","each()","each_line()","each_line()","each_pair()","empty?()","eof()","eof?()","eos?()","fetch()","field()","field?()","field_row?()","field_size_limit()","field_size_limit()","fields()","filter()","flock()","force_quotes?()","foreach()","generate()","generate_line()","generate_lines()","gets()","has_key?()","header?()","header_convert()","header_converters()","header_row?()","header_row?()","header_row?()","headers()","headers()","headers()","headers()","include?()","index()","initialize_copy()","inspect()","inspect()","inspect()","instance()","ioctl()","keep_back()","keep_back()","keep_drop()","keep_drop()","keep_end()","keep_end()","keep_start()","keep_start()","key?()","liberal_parsing?()","liberal_parsing?()","line()","line()","lineno()","lineno()","max_field_size()","max_field_size()","member?()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","open()","parse()","parse()","parse_csv()","parse_line()","path()","push()","push()","puts()","quote_char()","quote_character()","read()","read()","readline()","readlines()","readlines()","rest()","return_headers?()","return_headers?()","rewind()","rewind()","row_sep()","row_separator()","scan()","scan_all()","shift()","skip_blanks?()","skip_blanks?()","skip_lines()","skip_lines()","stat()","table()","to_a()","to_csv()","to_csv()","to_csv()","to_h()","to_hash()","to_i()","to_io()","to_s()","to_s()","unconverted_fields?()","unconverted_fields?()","use_headers?()","value()","values_at()","values_at()","write_headers?()","license","news","readme","filtering","generating","parsing","recipes"],"longSearchIndex":["array","csv","csv::fieldsconverter","csv::inputrecordseparator","csv::invalidencodingerror","csv::malformedcsverror","csv::parser","csv::parser::inputsscanner","csv::parser::invalidencoding","csv::parser::scanner","csv::parser::unexpectederror","csv::row","csv::tsv","csv::table","csv::writer","object","string","csv#<<()","csv::row#<<()","csv::table#<<()","csv::writer#<<()","csv::row#==()","csv::table#==()","object#csv()","csv::row#[]()","csv::table#[]()","csv::row#[]=()","csv::table#[]=()","csv::fieldsconverter#add_converter()","csv#add_row()","csv#binmode?()","csv::table#by_col()","csv::table#by_col!()","csv::table#by_col_or_row()","csv::table#by_col_or_row!()","csv::table#by_row()","csv::table#by_row!()","csv::parser::inputsscanner#check()","csv#col_sep()","csv::parser#column_separator()","csv#convert()","csv::fieldsconverter#convert()","csv#converters()","csv::row#deconstruct()","csv::row#deconstruct_keys()","csv::row#delete()","csv::table#delete()","csv::row#delete_if()","csv::table#delete_if()","csv::row#dig()","csv::table#dig()","csv#each()","csv::fieldsconverter#each()","csv::row#each()","csv::table#each()","csv::parser::inputsscanner#each_line()","csv::parser::scanner#each_line()","csv::row#each_pair()","csv::fieldsconverter#empty?()","csv#eof()","csv#eof?()","csv::parser::inputsscanner#eos?()","csv::row#fetch()","csv::row#field()","csv::row#field?()","csv::row#field_row?()","csv#field_size_limit()","csv::parser#field_size_limit()","csv::row#fields()","csv::filter()","csv#flock()","csv#force_quotes?()","csv::foreach()","csv::generate()","csv::generate_line()","csv::generate_lines()","csv#gets()","csv::row#has_key?()","csv::row#header?()","csv#header_convert()","csv#header_converters()","csv#header_row?()","csv::parser#header_row?()","csv::row#header_row?()","csv#headers()","csv::parser#headers()","csv::row#headers()","csv::table#headers()","csv::row#include?()","csv::row#index()","csv::row#initialize_copy()","csv#inspect()","csv::row#inspect()","csv::table#inspect()","csv::instance()","csv#ioctl()","csv::parser::inputsscanner#keep_back()","csv::parser::scanner#keep_back()","csv::parser::inputsscanner#keep_drop()","csv::parser::scanner#keep_drop()","csv::parser::inputsscanner#keep_end()","csv::parser::scanner#keep_end()","csv::parser::inputsscanner#keep_start()","csv::parser::scanner#keep_start()","csv::row#key?()","csv#liberal_parsing?()","csv::parser#liberal_parsing?()","csv#line()","csv::parser#line()","csv#lineno()","csv::parser#lineno()","csv#max_field_size()","csv::parser#max_field_size()","csv::row#member?()","csv::new()","csv::fieldsconverter::new()","csv::invalidencodingerror::new()","csv::malformedcsverror::new()","csv::parser::new()","csv::parser::inputsscanner::new()","csv::parser::scanner::new()","csv::row::new()","csv::tsv::new()","csv::table::new()","csv::writer::new()","csv::open()","csv::parse()","csv::parser#parse()","string#parse_csv()","csv::parse_line()","csv#path()","csv::row#push()","csv::table#push()","csv#puts()","csv#quote_char()","csv::parser#quote_character()","csv::read()","csv#read()","csv#readline()","csv::readlines()","csv#readlines()","csv::parser::inputsscanner#rest()","csv#return_headers?()","csv::parser#return_headers?()","csv#rewind()","csv::writer#rewind()","csv#row_sep()","csv::parser#row_separator()","csv::parser::inputsscanner#scan()","csv::parser::inputsscanner#scan_all()","csv#shift()","csv#skip_blanks?()","csv::parser#skip_blanks?()","csv#skip_lines()","csv::parser#skip_lines()","csv#stat()","csv::table()","csv::table#to_a()","array#to_csv()","csv::row#to_csv()","csv::table#to_csv()","csv::row#to_h()","csv::row#to_hash()","csv#to_i()","csv#to_io()","csv::row#to_s()","csv::table#to_s()","csv#unconverted_fields?()","csv::parser#unconverted_fields?()","csv::parser#use_headers?()","csv::inputrecordseparator::value()","csv::row#values_at()","csv::table#values_at()","csv#write_headers?()","","","","","","",""],"info":[["Array","","Array.html","",""],["CSV","","CSV.html","","
CSV\n
CSV Data\n
CSV (comma-separated values) data is a text representation of a table:\n"],["CSV::FieldsConverter","","CSV/FieldsConverter.html","","
Note: Don't use this class directly. This is an internal class.\n"],["CSV::InputRecordSeparator","","CSV/InputRecordSeparator.html","",""],["CSV::InvalidEncodingError","","CSV/InvalidEncodingError.html","","
The error thrown when the parser encounters invalid encoding in CSV.\n"],["CSV::MalformedCSVError","","CSV/MalformedCSVError.html","","
The error thrown when the parser encounters illegal CSV formatting.\n"],["CSV::Parser","","CSV/Parser.html","","
Note: Don't use this class directly. This is an internal class.\n"],["CSV::Parser::InputsScanner","","CSV/Parser/InputsScanner.html","","
CSV::InputsScanner receives IO inputs, encoding and the chunk_size. It also controls the life cycle of …\n"],["CSV::Parser::InvalidEncoding","","CSV/Parser/InvalidEncoding.html","","
Raised when encoding is invalid.\n"],["CSV::Parser::Scanner","","CSV/Parser/Scanner.html","","
CSV::Scanner receives a CSV output, scans it and return the content. It also controls the life cycle …\n"],["CSV::Parser::UnexpectedError","","CSV/Parser/UnexpectedError.html","","
Raised when unexpected case is happen.\n"],["CSV::Row","","CSV/Row.html","","
CSV::Row\n
A CSV::Row instance represents a CSV table row. (see class CSV).\n
The instance may have:\n"],["CSV::TSV","","CSV/TSV.html","",""],["CSV::Table","","CSV/Table.html","","
CSV::Table\n
A CSV::Table instance represents CSV data. (see class CSV).\n
The instance may have:\n"],["CSV::Writer","","CSV/Writer.html","","
Note: Don't use this class directly. This is an internal class.\n"],["Object","","Object.html","",""],["String","","String.html","",""],["<<","CSV","CSV.html#method-i-3C-3C","(row)","
Appends a row to self
.\n
Argument row
must be an Array object or a CSV::Row object.\n
The output stream must …\n"],["<<","CSV::Row","CSV/Row.html#method-i-3C-3C","(arg)","
Adds a field to self
; returns self
:\n
If the argument is a 2-element Array [header, value]
, a field is added …\n"],["<<","CSV::Table","CSV/Table.html#method-i-3C-3C","(row_or_array)","
If row_or_array
is a CSV::Row object, it is appended to the table:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["<<","CSV::Writer","CSV/Writer.html#method-i-3C-3C","(row)","
Adds a new row\n"],["==","CSV::Row","CSV/Row.html#method-i-3D-3D","(other)","
Returns true
if other
is a /CSV::Row that has the same fields (headers and values) in the same order …\n"],["==","CSV::Table","CSV/Table.html#method-i-3D-3D","(other)","
Returns true
if all each row of self
==
the corresponding row of other_table
, otherwise, false
.\n
The access …\n"],["CSV","Object","Object.html#method-i-CSV","(*args, **options, &block)","
Passes args
to CSV::instance.\n\n
CSV("CSV,data").read\n #=> [["CSV", "data"]]\n\n
If a block is given, the instance …\n"],["[]","CSV::Row","CSV/Row.html#method-i-5B-5D","(header_or_index, minimum_index = 0)",""],["[]","CSV::Table","CSV/Table.html#method-i-5B-5D","(index_or_header)","
Returns data from the table; does not modify the table.\n
Fetch a Row by Its Integer Index — \n
Form: table[n]
…\n"],["[]=","CSV::Row","CSV/Row.html#method-i-5B-5D-3D","(*args)","
Assigns the field value for the given index
or header
; returns value
.\n
Assign field value by Integer index: …\n"],["[]=","CSV::Table","CSV/Table.html#method-i-5B-5D-3D","(index_or_header, value)","
Puts data onto the table.\n
Set a Row by Its Integer Index — \n
Form: table[n] = row
, n
an Integer, row
a CSV::Row …\n"],["add_converter","CSV::FieldsConverter","CSV/FieldsConverter.html#method-i-add_converter","(name=nil, &converter)",""],["add_row","CSV","CSV.html#method-i-add_row","(row)",""],["binmode?","CSV","CSV.html#method-i-binmode-3F","()",""],["by_col","CSV::Table","CSV/Table.html#method-i-by_col","()","
Returns a duplicate of self
, in column mode (see Column Mode):\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["by_col!","CSV::Table","CSV/Table.html#method-i-by_col-21","()","
Sets the mode for self
to column mode (see Column Mode); returns self
:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["by_col_or_row","CSV::Table","CSV/Table.html#method-i-by_col_or_row","()","
Returns a duplicate of self
, in mixed mode (see Mixed Mode):\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["by_col_or_row!","CSV::Table","CSV/Table.html#method-i-by_col_or_row-21","()","
Sets the mode for self
to mixed mode (see Mixed Mode); returns self
:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["by_row","CSV::Table","CSV/Table.html#method-i-by_row","()","
Returns a duplicate of self
, in row mode (see Row Mode):\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["by_row!","CSV::Table","CSV/Table.html#method-i-by_row-21","()","
Sets the mode for self
to row mode (see Row Mode); returns self
:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["check","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-check","(pattern)",""],["col_sep","CSV","CSV.html#method-i-col_sep","()","
Returns the encoded column separator; used for parsing and writing; see Option col_sep:\n\n
CSV.new('').col_sep ...\n\n"],["column_separator","CSV::Parser","CSV/Parser.html#method-i-column_separator","()",""],["convert","CSV","CSV.html#method-i-convert","(name = nil, &converter)","
With no block, installs a field converter (a Proc).\n
With a block, defines and installs a custom field …\n"],["convert","CSV::FieldsConverter","CSV/FieldsConverter.html#method-i-convert","(fields, headers, lineno, quoted_fields=NO_QUOTED_FIELDS)",""],["converters","CSV","CSV.html#method-i-converters","()","
Returns an Array containing field converters; see Field Converters:\n\n
csv = CSV.new('')\ncsv.converters # ...\n\n"],["deconstruct","CSV::Row","CSV/Row.html#method-i-deconstruct","()","
Returns the new Array suitable for pattern matching containing the values of the row.\n"],["deconstruct_keys","CSV::Row","CSV/Row.html#method-i-deconstruct_keys","(keys)","
Returns the new Hash suitable for pattern matching containing only the keys specified as an argument. …\n"],["delete","CSV::Row","CSV/Row.html#method-i-delete","(header_or_index, minimum_index = 0)","
Removes a specified field from self
; returns the 2-element Array [header, value]
if the field exists. …\n"],["delete","CSV::Table","CSV/Table.html#method-i-delete","(*indexes_or_headers)","
If the access mode is :row
or :col_or_row
, and each argument is either an Integer or a Range, returns …\n"],["delete_if","CSV::Row","CSV/Row.html#method-i-delete_if","(&block)","
Removes fields from self
as selected by the block; returns self
.\n
Removes each field for which the block …\n"],["delete_if","CSV::Table","CSV/Table.html#method-i-delete_if","(&block)","
Removes rows or columns for which the block returns a truthy value; returns self
.\n
Removes rows when the …\n"],["dig","CSV::Row","CSV/Row.html#method-i-dig","(index_or_header, *indexes)","
Finds and returns the object in nested object that is specified by index_or_header
and specifiers
.\n
The …\n"],["dig","CSV::Table","CSV/Table.html#method-i-dig","(index_or_header, *index_or_headers)","
Extracts the nested value specified by the sequence of index
or header
objects by calling dig at each …\n"],["each","CSV","CSV.html#method-i-each","(&block)","
Calls the block with each successive row. The data source must be opened for reading.\n
Without headers: …\n"],["each","CSV::FieldsConverter","CSV/FieldsConverter.html#method-i-each","(&block)",""],["each","CSV::Row","CSV/Row.html#method-i-each","(&block)","
Calls the block with each header-value pair; returns self
:\n\n
source = "Name,Name,Name\\nFoo,Bar,Baz\\n"\ntable ...\n\n"],["each","CSV::Table","CSV/Table.html#method-i-each","(&block)","
Calls the block with each row or column; returns self
.\n
When the access mode is :row
or :col_or_row
, calls …\n"],["each_line","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-each_line","(row_separator)",""],["each_line","CSV::Parser::Scanner","CSV/Parser/Scanner.html#method-i-each_line","(row_separator)",""],["each_pair","CSV::Row","CSV/Row.html#method-i-each_pair","(&block)",""],["empty?","CSV::FieldsConverter","CSV/FieldsConverter.html#method-i-empty-3F","()",""],["eof","CSV","CSV.html#method-i-eof","()",""],["eof?","CSV","CSV.html#method-i-eof-3F","()",""],["eos?","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-eos-3F","()",""],["fetch","CSV::Row","CSV/Row.html#method-i-fetch","(header, *varargs)","
Returns the field value as specified by header
.\n
With the single argument header
, returns the field value …\n"],["field","CSV::Row","CSV/Row.html#method-i-field","(header_or_index, minimum_index = 0)","
Returns the field value for the given index
or header
.\n
Fetch field value by Integer index:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["field?","CSV::Row","CSV/Row.html#method-i-field-3F","(data)","
Returns true
if value
is a field in this row, false
otherwise:\n\n
source = "Name,Name,Name\\nFoo,Bar,Baz\\n" ...\n\n"],["field_row?","CSV::Row","CSV/Row.html#method-i-field_row-3F","()","
Returns true
if this is a field row, false
otherwise.\n"],["field_size_limit","CSV","CSV.html#method-i-field_size_limit","()","
Returns the limit for field size; used for parsing; see Option field_size_limit:\n\n
CSV.new('').field_size_limit ...\n\n"],["field_size_limit","CSV::Parser","CSV/Parser.html#method-i-field_size_limit","()",""],["fields","CSV::Row","CSV/Row.html#method-i-fields","(*headers_and_or_indices)","
Returns field values per the given specifiers
, which may be any mixture of:\n
Integer index.\n
Range of Integer …\n"],["filter","CSV","CSV.html#method-c-filter","(input=nil, output=nil, **options)","
Parses CSV from a source (String, IO stream, or ARGF).\n
Calls the given block with each parsed row:\n
Without …\n"],["flock","CSV","CSV.html#method-i-flock","(*args)",""],["force_quotes?","CSV","CSV.html#method-i-force_quotes-3F","()","
Returns the value that determines whether all output fields are to be quoted; used for generating; see …\n"],["foreach","CSV","CSV.html#method-c-foreach","(path, mode=\"r\", **options, &block)","
Calls the block with each row read from source path_or_io
.\n
Path input without headers:\n\n
string = "foo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["generate","CSV","CSV.html#method-c-generate","(str=nil, **options)","
Argument csv_string
, if given, must be a String object; defaults to a new empty String.\n
Arguments options
…\n\n"],["generate_line","CSV","CSV.html#method-c-generate_line","(row, **options)","
Returns the String created by generating CSV from ary
using the specified options
.\n
Argument ary
must be …\n"],["generate_lines","CSV","CSV.html#method-c-generate_lines","(rows, **options)","
Returns the String created by generating CSV from using the specified options
.\n
Argument rows
must be an …\n"],["gets","CSV","CSV.html#method-i-gets","()",""],["has_key?","CSV::Row","CSV/Row.html#method-i-has_key-3F","(header)","
Returns true
if there is a field with the given header
, false
otherwise.\n"],["header?","CSV::Row","CSV/Row.html#method-i-header-3F","(header)",""],["header_convert","CSV","CSV.html#method-i-header_convert","(name = nil, &converter)","
The block need not return a String object:\n\n
csv = CSV.open(path, headers: true)\ncsv.header_convert {|header, ...\n"],["header_converters","CSV","CSV.html#method-i-header_converters","()","
Returns an Array containing header converters; used for parsing; see Header Converters:\n\n
CSV.new('').header_converters ...\n\n"],["header_row?","CSV","CSV.html#method-i-header_row-3F","()","
Returns true
if the next row to be read is a header row; false
otherwise.\n
Without headers:\n\n
string = "foo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["header_row?","CSV::Parser","CSV/Parser.html#method-i-header_row-3F","()",""],["header_row?","CSV::Row","CSV/Row.html#method-i-header_row-3F","()","
Returns true
if this is a header row, false
otherwise.\n"],["headers","CSV","CSV.html#method-i-headers","()","
Returns the value that determines whether headers are used; used for parsing; see Option headers:\n\n
CSV.new('').headers ...\n\n"],["headers","CSV::Parser","CSV/Parser.html#method-i-headers","()",""],["headers","CSV::Row","CSV/Row.html#method-i-headers","()","
Returns the headers for this row:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n"\ntable = CSV.parse(source, ...\n"],["headers","CSV::Table","CSV/Table.html#method-i-headers","()","
Returns a new Array containing the String headers for the table.\n
If the table is not empty, returns the …\n"],["include?","CSV::Row","CSV/Row.html#method-i-include-3F","(header)",""],["index","CSV::Row","CSV/Row.html#method-i-index","(header, minimum_index = 0)","
Returns the index for the given header, if it exists; otherwise returns nil
.\n
With the single argument …\n"],["initialize_copy","CSV::Row","CSV/Row.html#method-i-initialize_copy","(other)","
Calls superclass method.\n"],["inspect","CSV","CSV.html#method-i-inspect","()","
Returns a String showing certain properties of self
:\n\n
string = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n"\ncsv ...\n\n"],["inspect","CSV::Row","CSV/Row.html#method-i-inspect","()","
Returns an ASCII-compatible String showing:\n
Class CSV::Row.\n
Header-value pairs.\n"],["inspect","CSV::Table","CSV/Table.html#method-i-inspect","()","
Returns a US-ASCII
-encoded String showing table:\n
Class: CSV::Table
.\n
Access mode: :row
, :col
, or :col_or_row
…\n"],["instance","CSV","CSV.html#method-c-instance","(data = $stdout, **options)","
Creates or retrieves cached CSV objects. For arguments and options, see CSV.new.\n
This API is not Ractor-safe. …\n"],["ioctl","CSV","CSV.html#method-i-ioctl","(*args)",""],["keep_back","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-keep_back","()",""],["keep_back","CSV::Parser::Scanner","CSV/Parser/Scanner.html#method-i-keep_back","()",""],["keep_drop","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-keep_drop","()",""],["keep_drop","CSV::Parser::Scanner","CSV/Parser/Scanner.html#method-i-keep_drop","()",""],["keep_end","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-keep_end","()",""],["keep_end","CSV::Parser::Scanner","CSV/Parser/Scanner.html#method-i-keep_end","()",""],["keep_start","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-keep_start","()",""],["keep_start","CSV::Parser::Scanner","CSV/Parser/Scanner.html#method-i-keep_start","()",""],["key?","CSV::Row","CSV/Row.html#method-i-key-3F","(header)",""],["liberal_parsing?","CSV","CSV.html#method-i-liberal_parsing-3F","()","
Returns the value that determines whether illegal input is to be handled; used for parsing; see Option …\n"],["liberal_parsing?","CSV::Parser","CSV/Parser.html#method-i-liberal_parsing-3F","()",""],["line","CSV","CSV.html#method-i-line","()","
Returns the line most recently read:\n\n
string = "foo,0\\nbar,1\\nbaz,2\\n"\npath = 't.csv'\nFile.write(path, ...\n"],["line","CSV::Parser","CSV/Parser.html#method-i-line","()",""],["lineno","CSV","CSV.html#method-i-lineno","()","
Returns the count of the rows parsed or generated.\n
Parsing:\n\n
string = "foo,0\\nbar,1\\nbaz,2\\n"\npath = 't.csv' ...\n\n"],["lineno","CSV::Parser","CSV/Parser.html#method-i-lineno","()",""],["max_field_size","CSV","CSV.html#method-i-max_field_size","()","
Returns the limit for field size; used for parsing; see Option max_field_size:\n\n
CSV.new('').max_field_size ...\n\n"],["max_field_size","CSV::Parser","CSV/Parser.html#method-i-max_field_size","()",""],["member?","CSV::Row","CSV/Row.html#method-i-member-3F","(header)",""],["new","CSV","CSV.html#method-c-new","(data, col_sep: \",\", row_sep: :auto, quote_char: '\"', field_size_limit: nil, max_field_size: nil, converters: nil, unconverted_fields: nil, headers: false, return_headers: false, write_headers: nil, header_converters: nil, skip_blanks: false, force_quotes: false, skip_lines: nil, liberal_parsing: false, internal_encoding: nil, external_encoding: nil, encoding: nil, nil_value: nil, empty_value: \"\", strip: false, quote_empty: true, write_converters: nil, write_nil_value: nil, write_empty_value: \"\")","
Returns the new CSV object created using string
or io
and the specified options
.\n
Argument string
should …\n"],["new","CSV::FieldsConverter","CSV/FieldsConverter.html#method-c-new","(options={})","
A CSV::FieldsConverter is a data structure for storing the fields converter properties to be passed as …\n"],["new","CSV::InvalidEncodingError","CSV/InvalidEncodingError.html#method-c-new","(encoding, line_number)",""],["new","CSV::MalformedCSVError","CSV/MalformedCSVError.html#method-c-new","(message, line_number)",""],["new","CSV::Parser","CSV/Parser.html#method-c-new","(input, options)",""],["new","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-c-new","(inputs, encoding, row_separator, chunk_size: 8192)",""],["new","CSV::Parser::Scanner","CSV/Parser/Scanner.html#method-c-new","(*args)",""],["new","CSV::Row","CSV/Row.html#method-c-new","(headers, fields, header_row = false)","
Returns the new CSV::Row instance constructed from arguments headers
and fields
; both should be Arrays …\n"],["new","CSV::TSV","CSV/TSV.html#method-c-new","(data, **options)",""],["new","CSV::Table","CSV/Table.html#method-c-new","(array_of_rows, headers: nil)","
Returns a new CSV::Table object.\n
Argument array_of_rows
must be an Array of CSV::Row objects.\n
Argument …\n"],["new","CSV::Writer","CSV/Writer.html#method-c-new","(output, options)",""],["open","CSV","CSV.html#method-c-open","(filename_or_io, mode=\"r\", **options)","
possible options elements:\n\n
keyword form:\n :invalid => nil # raise error on invalid byte sequence ...\n"],["parse","CSV","CSV.html#method-c-parse","(str, **options, &block)","
Parses string
or io
using the specified options
.\n
Argument string
should be a String object; it will be …\n"],["parse","CSV::Parser","CSV/Parser.html#method-i-parse","(&block)",""],["parse_csv","String","String.html#method-i-parse_csv","(**options)","
Equivalent to CSV::parse_line(self, options)\n\n
"CSV,data".parse_csv\n #=> ["CSV", "data"]\n\n"],["parse_line","CSV","CSV.html#method-c-parse_line","(line, **options)","
Returns the data created by parsing the first line of string
or io
using the specified options
.\n
Argument …\n"],["path","CSV","CSV.html#method-i-path","()",""],["push","CSV::Row","CSV/Row.html#method-i-push","(*args)","
Appends each of the given values
to self
as a field; returns self
:\n\n
source = "Name,Name,Name\\nFoo,Bar,Baz\\n" ...\n\n"],["push","CSV::Table","CSV/Table.html#method-i-push","(*rows)","
A shortcut for appending multiple rows. Equivalent to:\n\n
rows.each {|row| self << row }\n\n
Each argument may …\n"],["puts","CSV","CSV.html#method-i-puts","(row)",""],["quote_char","CSV","CSV.html#method-i-quote_char","()","
Returns the encoded quote character; used for parsing and writing; see Option quote_char:\n\n
CSV.new('').quote_char ...\n\n"],["quote_character","CSV::Parser","CSV/Parser.html#method-i-quote_character","()",""],["read","CSV","CSV.html#method-c-read","(path, **options)","
Opens the given source
with the given options
(see CSV.open), reads the source (see CSV#read), and returns …\n"],["read","CSV","CSV.html#method-i-read","()","
Forms the remaining rows from self
into:\n
A CSV::Table object, if headers are in use.\n
An Array of Arrays …\n"],["readline","CSV","CSV.html#method-i-readline","()",""],["readlines","CSV","CSV.html#method-c-readlines","(path, **options)","
Alias for CSV.read.\n"],["readlines","CSV","CSV.html#method-i-readlines","()",""],["rest","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-rest","()",""],["return_headers?","CSV","CSV.html#method-i-return_headers-3F","()","
Returns the value that determines whether headers are to be returned; used for parsing; see Option return_headers …\n"],["return_headers?","CSV::Parser","CSV/Parser.html#method-i-return_headers-3F","()",""],["rewind","CSV","CSV.html#method-i-rewind","()","
Rewinds the underlying IO object and resets CSV's lineno() counter.\n"],["rewind","CSV::Writer","CSV/Writer.html#method-i-rewind","()","
Winds back to the beginning\n"],["row_sep","CSV","CSV.html#method-i-row_sep","()","
Returns the encoded row separator; used for parsing and writing; see Option row_sep:\n\n
CSV.new('').row_sep ...\n\n"],["row_separator","CSV::Parser","CSV/Parser.html#method-i-row_separator","()",""],["scan","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-scan","(pattern)",""],["scan_all","CSV::Parser::InputsScanner","CSV/Parser/InputsScanner.html#method-i-scan_all","(pattern)",""],["shift","CSV","CSV.html#method-i-shift","()","
Returns the next row of data as:\n
An Array if no headers are used.\n
A CSV::Row object if headers are used. …\n"],["skip_blanks?","CSV","CSV.html#method-i-skip_blanks-3F","()","
Returns the value that determines whether blank lines are to be ignored; used for parsing; see Option …\n"],["skip_blanks?","CSV::Parser","CSV/Parser.html#method-i-skip_blanks-3F","()",""],["skip_lines","CSV","CSV.html#method-i-skip_lines","()","
Returns the Regexp used to identify comment lines; used for parsing; see Option skip_lines:\n\n
CSV.new('').skip_lines ...\n\n"],["skip_lines","CSV::Parser","CSV/Parser.html#method-i-skip_lines","()",""],["stat","CSV","CSV.html#method-i-stat","(*args)",""],["table","CSV","CSV.html#method-c-table","(path, **options)","
Calls CSV.read with source
, options
, and certain default options:\n
headers
: true
\n
converters
: :numeric
\n"],["to_a","CSV::Table","CSV/Table.html#method-i-to_a","()","
Returns the table as an Array of Arrays; the headers are in the first row:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["to_csv","Array","Array.html#method-i-to_csv","(**options)","
Equivalent to CSV::generate_line(self, options)\n\n
["CSV", "data"].to_csv\n #=> "CSV,data\\n"\n\n"],["to_csv","CSV::Row","CSV/Row.html#method-i-to_csv","(**options)","
Returns the row as a CSV String. Headers are not included:\n\n
source = "Name,Value\\nfoo,0\\nbar,1\\nbaz,2\\n" ...\n\n"],["to_csv","CSV::Table","CSV/Table.html#method-i-to_csv","(write_headers: true, limit: nil, **options)","
Returns the table as CSV string. See Options for Generating.\n
Defaults option write_headers
to true
:\n\n
source ...\n\n"],["to_h","CSV::Row","CSV/Row.html#method-i-to_h","()","
Returns the new Hash formed by adding each header-value pair in self
as a key-value pair in the Hash …\n"],["to_hash","CSV::Row","CSV/Row.html#method-i-to_hash","()",""],["to_i","CSV","CSV.html#method-i-to_i","()",""],["to_io","CSV","CSV.html#method-i-to_io","()",""],["to_s","CSV::Row","CSV/Row.html#method-i-to_s","(**options)",""],["to_s","CSV::Table","CSV/Table.html#method-i-to_s","(write_headers: true, limit: nil, **options)",""],["unconverted_fields?","CSV","CSV.html#method-i-unconverted_fields-3F","()","
Returns the value that determines whether unconverted fields are to be available; used for parsing; see …\n"],["unconverted_fields?","CSV::Parser","CSV/Parser.html#method-i-unconverted_fields-3F","()",""],["use_headers?","CSV::Parser","CSV/Parser.html#method-i-use_headers-3F","()",""],["value","CSV::InputRecordSeparator","CSV/InputRecordSeparator.html#method-c-value","()",""],["values_at","CSV::Row","CSV/Row.html#method-i-values_at","(*headers_and_or_indices)",""],["values_at","CSV::Table","CSV/Table.html#method-i-values_at","(*indices_or_headers)","
If the access mode is :row
or :col_or_row
, and each argument is either an Integer or a Range, returns …\n"],["write_headers?","CSV","CSV.html#method-i-write_headers-3F","()","
Returns the value that determines whether headers are to be written; used for generating; see Option …\n"],["LICENSE","","LICENSE_txt.html","","
Copyright (C) 2005-2016 James Edward Gray II. All rights reserved. Copyright (C) 2007-2017 Yukihiro …\n"],["NEWS","","NEWS_md.html","","
News\n
3.3.1 - 2024-12-15\n
Improvements\n"],["README","","README_md.html","","
CSV\n
This library provides a complete interface to CSV files and data. It offers tools to enable you to …\n"],["filtering","","doc/csv/recipes/filtering_rdoc.html","","
Recipes for Filtering CSV\n
These recipes are specific code examples for specific CSV filtering tasks.\n
For …\n"],["generating","","doc/csv/recipes/generating_rdoc.html","","
Recipes for Generating CSV\n
These recipes are specific code examples for specific CSV generating tasks. …\n"],["parsing","","doc/csv/recipes/parsing_rdoc.html","","
Recipes for Parsing CSV\n
These recipes are specific code examples for specific CSV parsing tasks.\n
For other …\n"],["recipes","","doc/csv/recipes/recipes_rdoc.html","","
Recipes for CSV\n
The recipes are specific code examples for specific tasks. See:\n
Recipes for Parsing CSV …\n"]]}} \ No newline at end of file diff --git a/js/search_index.js.gz b/js/search_index.js.gz index 94c588a..3156e2d 100644 Binary files a/js/search_index.js.gz and b/js/search_index.js.gz differ diff --git a/table_of_contents.html b/table_of_contents.html index b2be07c..a285708 100644 --- a/table_of_contents.html +++ b/table_of_contents.html @@ -44,6 +44,12 @@