Class: LicenseFinder::DiffReport

Inherits:
CsvReport show all
Defined in:
lib/license_finder/reports/diff_report.rb

Constant Summary collapse

AVAILABLE_COLUMNS =
AVAILABLE_COLUMNS + %w[status current_version previous_version project_paths]

Constants inherited from CsvReport

CsvReport::COMMA_SEP, CsvReport::MISSING_DEPENDENCY_TEXT, CsvReport::NEWLINE_SEP

Instance Method Summary collapse

Methods inherited from CsvReport

#to_s

Methods inherited from Report

of

Constructor Details

#initialize(dependencies, options = {}) ⇒ DiffReport

Returns a new instance of DiffReport.



5
6
7
# File 'lib/license_finder/reports/diff_report.rb', line 5

def initialize(dependencies, options = {})
  super(dependencies, options.merge(columns: build_columns(dependencies)))
end

Instance Method Details

#format_project_paths(dep) ⇒ Object



17
18
19
# File 'lib/license_finder/reports/diff_report.rb', line 17

def format_project_paths(dep)
  dep.aggregate_paths.join(self.class::COMMA_SEP)
end

#format_status(dep) ⇒ Object



9
10
11
# File 'lib/license_finder/reports/diff_report.rb', line 9

def format_status(dep)
  dep.status
end

#format_version(dep) ⇒ Object



13
14
15
# File 'lib/license_finder/reports/diff_report.rb', line 13

def format_version(dep)
  dep.version
end