Class: Hashira::Pipeline
- Inherits:
-
Object
- Object
- Hashira::Pipeline
- Defined in:
- lib/hashira/pipeline.rb
Constant Summary collapse
- RULES =
[Analysis::CycleFindings, Analysis::SdpViolationFindings].freeze
Instance Attribute Summary collapse
-
#graph ⇒ Object
readonly
Returns the value of attribute graph.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #findings ⇒ Object
-
#initialize(project) ⇒ Pipeline
constructor
A new instance of Pipeline.
Constructor Details
#initialize(project) ⇒ Pipeline
Returns a new instance of Pipeline.
7 8 9 10 11 12 |
# File 'lib/hashira/pipeline.rb', line 7 def initialize(project) @project = project trees = project.files.to_h { [_1, parse(_1)] } @census = Analysis::Census.new(project, trees) @graph = Analysis::Graph.new(project, trees, @census) end |
Instance Attribute Details
#graph ⇒ Object (readonly)
Returns the value of attribute graph.
14 15 16 |
# File 'lib/hashira/pipeline.rb', line 14 def graph @graph end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
14 15 16 |
# File 'lib/hashira/pipeline.rb', line 14 def project @project end |
Instance Method Details
#findings ⇒ Object
18 |
# File 'lib/hashira/pipeline.rb', line 18 def findings = RULES.flat_map { _1.new(@project, @graph).list } |