Class: Steep::Errors::BreakTypeMismatch

Inherits:
Base
  • Object
show all
Includes:
ResultPrinter
Defined in:
lib/steep/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#node

Instance Method Summary collapse

Methods included from ResultPrinter

#print_result_to, #print_to

Methods inherited from Base

#location_to_str, #print_to

Constructor Details

#initialize(node:, expected:, actual:, result:) ⇒ BreakTypeMismatch

Returns a new instance of BreakTypeMismatch.



210
211
212
213
214
215
# File 'lib/steep/errors.rb', line 210

def initialize(node:, expected:, actual:, result:)
  super(node: node)
  @expected = expected
  @actual = actual
  @result = result
end

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



205
206
207
# File 'lib/steep/errors.rb', line 205

def actual
  @actual
end

#expectedObject (readonly)

Returns the value of attribute expected.



204
205
206
# File 'lib/steep/errors.rb', line 204

def expected
  @expected
end

#resultObject (readonly)

Returns the value of attribute result.



206
207
208
# File 'lib/steep/errors.rb', line 206

def result
  @result
end

Instance Method Details

#to_sObject



217
218
219
# File 'lib/steep/errors.rb', line 217

def to_s
  "#{location_to_str}: BreakTypeMismatch: expected=#{expected}, actual=#{actual}"
end