--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This constructor will wrap either a String or IO object passed in <tt>data</tt> for reading and/or writing. In addition to the FasterCSV instance methods, several IO methods are delegated. (See FasterCSV::open() for a complete list.) If you pass a String for <tt>data</tt>, you can later retrieve it (after writing to it, for example) with FasterCSV.string().
- !ruby/struct:SM::Flow::P 
  body: Note that a wrapped String will be positioned at at the beginning (for reading). If you want it at the end (for writing), use FasterCSV::generate(). If you want any other positioning, pass a preset StringIO object instead.
- !ruby/struct:SM::Flow::P 
  body: "You may set any reading and/or writing preferences in the <tt>options</tt> Hash. Available options are:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "<b><tt>:col_sep</tt></b>:"
    body: The String placed between each field.
  - !ruby/struct:SM::Flow::LI 
    label: "<b><tt>:row_sep</tt></b>:"
    body: The String appended to the end of each row. This can be set to the special <tt>:auto</tt> setting, which requests that FasterCSV automatically discover this from the data. Auto-discovery reads ahead in the data looking for the next <tt>&quot;\r\n&quot;</tt>, <tt>&quot;\n&quot;</tt>, or <tt>&quot;\r&quot;</tt> sequence. 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, <tt>data</tt> is <tt>ARGF</tt>, <tt>STDIN</tt>, <tt>STDOUT</tt>, or <tt>STDERR</tt>, or the stream is only available for output, the default <tt>$INPUT_RECORD_SEPARATOR</tt> (<tt>$/</tt>) is used. Obviously, discovery takes a little time. Set manually if speed is important. Also note that IO objects should be opened in binary mode on Windows if this feature will be used as the line-ending translation can cause problems with resetting the document position to where it was before the read ahead.
  - !ruby/struct:SM::Flow::LI 
    label: "<b><tt>:quote_char</tt></b>:"
    body: The character used to quote fields. This has to be a single character String. This is useful for application that incorrectly use <tt>'</tt> as the quote character instead of the correct <tt>&quot;</tt>. FasterCSV will always consider a double sequence this character to be an escaped quote.
  - !ruby/struct:SM::Flow::LI 
    label: "<b><tt>:encoding</tt></b>:"
    body: "The encoding to use when parsing the file. Defaults to your <tt>$KDOCE</tt> setting. Valid values: <tt>`n\xE2\x80\x99</tt> or <tt>`N\xE2\x80\x99</tt> for none, <tt>`e\xE2\x80\x99</tt> or <tt>`E\xE2\x80\x99</tt> for EUC, <tt>`s\xE2\x80\x99</tt> or <tt>`S\xE2\x80\x99</tt> for SJIS, and <tt>`u\xE2\x80\x99</tt> or <tt>`U\xE2\x80\x99</tt> for UTF-8 (see Regexp.new())."
  - !ruby/struct:SM::Flow::LI 
    label: "<b><tt>:field_size_limit</tt></b>:"
    body: This is a maximum size FasterCSV will read ahead looking for the closing quote for a field. (In truth, it reads to the first line ending beyond this size.) If a quote cannot be found within the limit FasterCSV will raise a MalformedCSVError, assuming the data is faulty. You can use this limit to prevent what are effectively DoS attacks on the parser. However, this limit can cause a legitimate parse to fail and thus is set to <tt>nil</tt>, or off, by default.
  - !ruby/struct:SM::Flow::LI 
    label: "<b><tt>:converters</tt></b>:"
    body: An Array of names from the Converters Hash and/or lambdas that handle custom conversion. A single converter doesn't have to be in an Array.
  - !ruby/struct:SM::Flow::LI 
    label: "<b><tt>:unconverted_fields</tt></b>:"
    body: If set to <tt>true</tt>, an unconverted_fields() method will be added to all returned rows (Array or FasterCSV::Row) that will return the fields as they were before convertion. Note that <tt>:headers</tt> supplied by Array or String were not fields of the document and thus will have an empty Array attached.
  - !ruby/struct:SM::Flow::LI 
    label: "<b><tt>:headers</tt></b>:"
    body: If set to <tt>:first_row</tt> or <tt>true</tt>, the initial row of the CSV file will be treated as a row of headers. If set to an Array, the contents will be used as the headers. If set to a String, the String is run through a call of FasterCSV::parse_line() with the same <tt>:col_sep</tt>, <tt>:row_sep</tt>, and <tt>:quote_char</tt> as this instance to produce an Array of headers. This setting causes FasterCSV.shift() to return rows as FasterCSV::Row objects instead of Arrays and FasterCSV.read() to return FasterCSV::Table objects instead of an Array of Arrays.
  - !ruby/struct:SM::Flow::LI 
    label: "<b><tt>:return_headers</tt></b>:"
    body: When <tt>false</tt>, header rows are silently swallowed. If set to <tt>true</tt>, header rows are returned in a FasterCSV::Row object with identical headers and fields (save that the fields do not go through the converters).
  - !ruby/struct:SM::Flow::LI 
    label: "<b><tt>:write_headers</tt></b>:"
    body: When <tt>true</tt> and <tt>:headers</tt> is set, a header row will be added to the output.
  - !ruby/struct:SM::Flow::LI 
    label: "<b><tt>:header_converters</tt></b>:"
    body: Identical in functionality to <tt>:converters</tt> save that the conversions are only made to header rows.
  - !ruby/struct:SM::Flow::LI 
    label: "<b><tt>:skip_blanks</tt></b>:"
    body: When set to a <tt>true</tt> value, FasterCSV will skip over any rows with no content.
  - !ruby/struct:SM::Flow::LI 
    label: "<b><tt>:force_quotes</tt></b>:"
    body: When set to a <tt>true</tt> value, FasterCSV will quote all CSV fields it creates.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: See FasterCSV::DEFAULT_OPTIONS for the default settings.
- !ruby/struct:SM::Flow::P 
  body: Options cannot be overriden in the instance methods for performance reasons, so be sure to set what you want here.
full_name: FasterCSV::new
is_singleton: true
name: new
params: (data, options = Hash.new)
visibility: public
