Method: CSV::Writer#initialize

Defined in:
lib/csv/writer.rb

#initialize(output, options) ⇒ Writer

Returns a new instance of Writer.



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/csv/writer.rb', line 16

def initialize(output, options)
  @output = output
  @options = options
  @lineno = 0
  @fields_converter = nil
  prepare
  if @options[:write_headers] and @headers
    self << @headers
  end
  @fields_converter = @options[:fields_converter]
end