Class: Hashira::CI::Gate
- Inherits:
-
Object
- Object
- Hashira::CI::Gate
- Defined in:
- lib/hashira/ci/gate.rb
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(findings, kinds, io: $stdout) ⇒ Gate
constructor
A new instance of Gate.
Constructor Details
#initialize(findings, kinds, io: $stdout) ⇒ Gate
Returns a new instance of Gate.
4 5 6 7 8 |
# File 'lib/hashira/ci/gate.rb', line 4 def initialize(findings, kinds, io: $stdout) @findings = findings @kinds = kinds @io = io end |
Instance Method Details
#check ⇒ Object
10 11 12 13 |
# File 'lib/hashira/ci/gate.rb', line 10 def check offending = @findings.all.select { @kinds.include?(it.kind) } offending.empty? ? clean : failure(offending) end |