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, err: $stderr) ⇒ Gate
constructor
A new instance of Gate.
Constructor Details
#initialize(findings, kinds, io: $stdout, err: $stderr) ⇒ Gate
Returns a new instance of Gate.
4 5 6 7 8 9 |
# File 'lib/hashira/ci/gate.rb', line 4 def initialize(findings, kinds, io: $stdout, err: $stderr) @findings = findings @kinds = kinds @io = io @err = err end |
Instance Method Details
#check ⇒ Object
11 12 13 14 |
# File 'lib/hashira/ci/gate.rb', line 11 def check offending = @findings.all.select { @kinds.include?(it.kind) } offending.empty? ? clean : failure(offending) end |