Class: Steep::Errors::BlockTypeMismatch

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:) ⇒ BlockTypeMismatch

Returns a new instance of BlockTypeMismatch.



191
192
193
194
195
196
# File 'lib/steep/errors.rb', line 191

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.



186
187
188
# File 'lib/steep/errors.rb', line 186

def actual
  @actual
end

#expectedObject (readonly)

Returns the value of attribute expected.



185
186
187
# File 'lib/steep/errors.rb', line 185

def expected
  @expected
end

#resultObject (readonly)

Returns the value of attribute result.



187
188
189
# File 'lib/steep/errors.rb', line 187

def result
  @result
end

Instance Method Details

#to_sObject



198
199
200
# File 'lib/steep/errors.rb', line 198

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