# CSV::BasicWriter (Class)

In: | csv.rb
Parent: | Writer

DESCRIPTION

      CSV::BasicWriter -- CSV formatted string/stream writer using <<.

## Methods

close_on_terminate new

## Public Class methods

new(str_or_writable, col_sep = ?,, row_sep = nil)

SYNOPSIS

      writer = CSV::BasicWriter.new(str_or_writable)

ARGS

      str_or_writable: device for generated CSV string.  Must respond to
        '<<(string)'.

RETURNS

      writer: Created instance.

DESCRIPTION

      Create instance.  To add CSV data to generate CSV string, see
      CSV::Writer#<< or CSV::Writer#add_row.

[Source]

    # File csv.rb, line 675
        def initialize(str_or_writable, col_sep = ?,, row_sep = nil)
          @col_sep = col_sep
          @row_sep = row_sep
          @dev = str_or_writable
          @dev.binmode if @dev.respond_to?(:binmode)
          @close_on_terminate = false
        end

## Public Instance methods

close_on_terminate()

SYNOPSIS

      CSV::BasicWriter#close_on_terminate

RETURNS

      true

DESCRIPTION

      Tell this writer to close the IO when terminated (Triggered by invoking
      CSV::BasicWriter#close).

[Source]

    # File csv.rb, line 693
        def close_on_terminate
          @close_on_terminate = true
        end

[Validate]