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.



200
201
202
203
204
205
# File 'lib/steep/errors.rb', line 200

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.



195
196
197
# File 'lib/steep/errors.rb', line 195

def actual
  @actual
end

#expectedObject (readonly)

Returns the value of attribute expected.



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

def expected
  @expected
end

#resultObject (readonly)

Returns the value of attribute result.



196
197
198
# File 'lib/steep/errors.rb', line 196

def result
  @result
end

Instance Method Details

#to_sObject



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

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