Class: Erudite::Example::Outcome

Inherits:
Object
  • Object
show all
Defined in:
lib/erudite/example/outcome.rb

Overview

Information about an expected or actual outcome.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result, output) ⇒ Outcome

Returns a new instance of Outcome.



10
11
12
13
# File 'lib/erudite/example/outcome.rb', line 10

def initialize(result, output)
  @result = result
  @output = output
end

Instance Attribute Details

#outputObject (readonly)

Returns the value of attribute output.



8
9
10
# File 'lib/erudite/example/outcome.rb', line 8

def output
  @output
end

#resultObject (readonly)

Returns the value of attribute result.



7
8
9
# File 'lib/erudite/example/outcome.rb', line 7

def result
  @result
end

Instance Method Details

#==(other) ⇒ Object



15
16
17
18
# File 'lib/erudite/example/outcome.rb', line 15

def ==(other)
  result == other.result &&
    output == other.output
end