Class: Spandx::Cli::Printers::Csv

Inherits:
Spandx::Cli::Printer show all
Defined in:
lib/spandx/cli/printers/csv.rb

Instance Method Summary collapse

Methods inherited from Spandx::Cli::Printer

for, #print_footer, #print_header

Methods included from Spandx::Core::Registerable

#all, #each, #inherited, #registry

Instance Method Details

#match?(format) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/spandx/cli/printers/csv.rb', line 7

def match?(format)
  format.to_sym == :csv
end


11
12
13
# File 'lib/spandx/cli/printers/csv.rb', line 11

def print_line(dependency, io)
  io.puts(CSV.generate_line(dependency.to_a))
end