Class: Rigor::ModuleGraph::CycleDetector::Cycle
- Inherits:
-
Object
- Object
- Rigor::ModuleGraph::CycleDetector::Cycle
- Defined in:
- lib/rigor/module_graph/cycle_detector.rb
Overview
One detected cycle, expressed as the list of node names along it. Always rotated so the lexicographically smallest name comes first, so the rendered output is stable across runs.
Instance Method Summary collapse
-
#to_s ⇒ Object
Render the cycle as A -> B -> C -> A (note the closing repeat of the first node so the round-trip is obvious).
Instance Method Details
#to_s ⇒ Object
Render the cycle as A -> B -> C -> A (note the closing repeat of the first node so the round-trip is obvious).
30 31 32 |
# File 'lib/rigor/module_graph/cycle_detector.rb', line 30 def to_s nodes.join(" -> ") + " -> " + nodes.first end |