Sha256: ae8db983dcf8d8ff5a874edf05afb9cef9e71bb786b9653784633b13e14c6b6f

Contents?: true

Size: 375 Bytes

Versions: 16

Compression:

Stored size: 375 Bytes

Contents

module Formatters

  class Csv

    include Formatters::Base

    def header
      columns.join(',')
    end

    def rows
      file.methods.inject([]) do |a, method|
        a << "#{file.class_name},#{method.prefix}#{method.name},#{method.complexity}"
        a
      end.join("\r\n")
    end

    def footer
    end

    def file_extension
      ".csv"
    end

  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fukuzatsu-0.10.1 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.16 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.15 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.14 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.13 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.12 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.11 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.10 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.8 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.7 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.6 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.5 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.4 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.3 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.1 lib/fukuzatsu/formatters/csv.rb
fukuzatsu-0.9.0 lib/fukuzatsu/formatters/csv.rb