Class: QuietQuality::Tools::Outcome

Inherits:
Object
  • Object
show all
Defined in:
lib/quiet_quality/tools/outcome.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tool:, output:, logging: nil, failure: false) ⇒ Outcome

Returns a new instance of Outcome.



6
7
8
9
10
11
# File 'lib/quiet_quality/tools/outcome.rb', line 6

def initialize(tool:, output:, logging: nil, failure: false)
  @tool = tool
  @output = output
  @logging = logging
  @failure = failure
end

Instance Attribute Details

#loggingObject (readonly)

Returns the value of attribute logging.



4
5
6
# File 'lib/quiet_quality/tools/outcome.rb', line 4

def logging
  @logging
end

#outputObject (readonly)

Returns the value of attribute output.



4
5
6
# File 'lib/quiet_quality/tools/outcome.rb', line 4

def output
  @output
end

#toolObject (readonly)

Returns the value of attribute tool.



4
5
6
# File 'lib/quiet_quality/tools/outcome.rb', line 4

def tool
  @tool
end

Instance Method Details

#==(other) ⇒ Object



21
22
23
# File 'lib/quiet_quality/tools/outcome.rb', line 21

def ==(other)
  tool == other.tool && output == other.output && logging == other.logging && failure? == other.failure?
end

#failure?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/quiet_quality/tools/outcome.rb', line 13

def failure?
  @failure
end

#success?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/quiet_quality/tools/outcome.rb', line 17

def success?
  !failure?
end