Class: QuietQuality::Executors::BaseExecutor
- Inherits:
-
Object
- Object
- QuietQuality::Executors::BaseExecutor
show all
- Defined in:
- lib/quiet_quality/executors/base_executor.rb
Instance Method Summary
collapse
Constructor Details
#initialize(tools:, changed_files: nil) ⇒ BaseExecutor
Returns a new instance of BaseExecutor.
4
5
6
7
|
# File 'lib/quiet_quality/executors/base_executor.rb', line 4
def initialize(tools:, changed_files: nil)
@tools = tools
@changed_files = changed_files
end
|
Instance Method Details
#any_failure? ⇒ Boolean
21
22
23
|
# File 'lib/quiet_quality/executors/base_executor.rb', line 21
def any_failure?
pipelines.any?(&:failure?)
end
|
#execute! ⇒ Object
9
10
11
|
# File 'lib/quiet_quality/executors/base_executor.rb', line 9
def execute!
pipelines.none?(&:failure?)
end
|
#failed_outcomes ⇒ Object
29
30
31
|
# File 'lib/quiet_quality/executors/base_executor.rb', line 29
def failed_outcomes
@_failed_outcomes ||= outcomes.select(&:failure?)
end
|
#messages ⇒ Object
17
18
19
|
# File 'lib/quiet_quality/executors/base_executor.rb', line 17
def messages
@_messages ||= Messages.new(pipelines.map(&:messages).map(&:all).reduce(&:+))
end
|
#outcomes ⇒ Object
13
14
15
|
# File 'lib/quiet_quality/executors/base_executor.rb', line 13
def outcomes
@_outcomes ||= pipelines.map(&:outcome)
end
|
#successful_outcomes ⇒ Object
25
26
27
|
# File 'lib/quiet_quality/executors/base_executor.rb', line 25
def successful_outcomes
@_successful_outcomes ||= outcomes.select(&:success?)
end
|