Class: Hashira::CI::Ratchet
- Inherits:
-
Object
- Object
- Hashira::CI::Ratchet
- Defined in:
- lib/hashira/ci/ratchet.rb
Instance Method Summary collapse
- #blocker ⇒ Object
- #check ⇒ Object
-
#initialize(graph, findings, baseline, io: $stdout) ⇒ Ratchet
constructor
A new instance of Ratchet.
- #update ⇒ Object
Constructor Details
#initialize(graph, findings, baseline, io: $stdout) ⇒ Ratchet
Returns a new instance of Ratchet.
4 5 6 7 8 9 |
# File 'lib/hashira/ci/ratchet.rb', line 4 def initialize(graph, findings, baseline, io: $stdout) @graph = graph @findings = findings @baseline = baseline @io = io end |
Instance Method Details
#blocker ⇒ Object
19 20 21 22 |
# File 'lib/hashira/ci/ratchet.rb', line 19 def blocker return "no baseline at #{@baseline.path} — run --update-baseline first" unless @baseline.exist? drifted.first end |
#check ⇒ Object
17 |
# File 'lib/hashira/ci/ratchet.rb', line 17 def check = Hashira::CI::RatchetReport.new(@graph, @findings, io: @io).print(drift, delta) |