Class: Hashira::Coupling::Report

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

Constant Summary collapse

RULES =
[
  Hashira::Coupling::CycleFindings, Hashira::Coupling::SdpViolationFindings,
  Hashira::Coupling::MixedAudienceFindings, Hashira::Coupling::WideEdgeFindings,
  Hashira::Coupling::RollCallFindings
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Report.



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

def initialize(project, trees, packaging:)
  @project = project
  @graph = Hashira::Coupling::Graph.new(project, trees, census(trees, packaging))
end

Instance Attribute Details

#graphObject (readonly)

Returns the value of attribute graph.



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

def graph
  @graph
end

Instance Method Details

#findingsObject



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

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