Class: QuietQuality::Executors::Pipeline

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/quiet_quality/executors/pipeline.rb

Instance Method Summary collapse

Methods included from Logging

#debug, #info, #warn

Constructor Details

#initialize(tool_options:, changed_files: nil) ⇒ Pipeline

Returns a new instance of Pipeline.



6
7
8
9
# File 'lib/quiet_quality/executors/pipeline.rb', line 6

def initialize(tool_options:, changed_files: nil)
  @tool_options = tool_options
  @changed_files = changed_files
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/quiet_quality/executors/pipeline.rb', line 24

def failure?
  outcome.failure?
end

#messagesObject



28
29
30
31
# File 'lib/quiet_quality/executors/pipeline.rb', line 28

def messages
  return @_messages if defined?(@_messages)
  @_messages = relocated(filtered(parser.messages))
end

#outcomeObject



15
16
17
18
19
20
21
22
# File 'lib/quiet_quality/executors/pipeline.rb', line 15

def outcome
  @_outcome ||= Tools::Outcome.new(
    tool: runner_outcome.tool,
    output: runner_outcome.output,
    logging: runner_outcome.logging,
    failure: messages.any?
  )
end

#tool_nameObject



11
12
13
# File 'lib/quiet_quality/executors/pipeline.rb', line 11

def tool_name
  tool_options.tool_name
end