Class CSV::BasicWriter
In: lib/csv.rb
Parent: Writer

Methods

Public Class methods

[Source]

     # File lib/csv.rb, line 714
714:     def initialize(str_or_writable, fs = ',', rs = nil)
715:       @fs = fs
716:       @rs = rs
717:       @dev = str_or_writable
718:       @close_on_terminate = false
719:     end

Public Instance methods

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

[Source]

     # File lib/csv.rb, line 723
723:     def close_on_terminate
724:       @close_on_terminate = true
725:     end

Private Instance methods

[Source]

     # File lib/csv.rb, line 729
729:     def terminate
730:       if @close_on_terminate
731:         @dev.close
732:       end
733:     end

[Validate]