Class: Cuporter::Formatters::Csv

Inherits:
Writer
  • Object
show all
Includes:
TextMethods
Defined in:
lib/cuporter/formatters/csv.rb

Instance Method Summary collapse

Methods included from TextMethods

#write, #write_node

Methods inherited from Writer

#initialize

Constructor Details

This class inherits a constructor from Cuporter::Formatters::Writer

Instance Method Details

#line(number, line) ⇒ Object



11
12
13
14
# File 'lib/cuporter/formatters/csv.rb', line 11

def line(number, line)
  line.sub!(/^#{tab}/, "#{number}#{tab}") if number
  line
end

#tabObject



7
8
9
# File 'lib/cuporter/formatters/csv.rb', line 7

def tab
  ","
end