Class: Hashira::Coupling::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/hashira/coupling/report.rb

Constant Summary collapse

RULES =
Hashira::Coupling::Rule.subclasses.sort_by(&:name).freeze

Instance Method Summary collapse

Constructor Details

#initialize(project, trees, packaging:) ⇒ Report

Returns a new instance of Report.



13
14
15
16
17
# File 'lib/hashira/coupling/report.rb', line 13

def initialize(project, trees, packaging:)
  @project = project
  @trees = trees
  @packaging = packaging
end

Instance Method Details

#findingsObject



21
# File 'lib/hashira/coupling/report.rb', line 21

def findings = RULES.flat_map { it.new(@project, graph).list }

#graphObject



19
# File 'lib/hashira/coupling/report.rb', line 19

def graph = @_graph ||= Hashira::Coupling::Graph.new(@project, @trees, census)