Class: Steep::Errors::IncompatibleTuple

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_tuple:, result:) ⇒ IncompatibleTuple

Returns a new instance of IncompatibleTuple.



510
511
512
513
514
# File 'lib/steep/errors.rb', line 510

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

Instance Attribute Details

#expected_tupleObject (readonly)

Returns the value of attribute expected_tuple.



507
508
509
# File 'lib/steep/errors.rb', line 507

def expected_tuple
  @expected_tuple
end

Instance Method Details

#to_sObject



516
517
518
# File 'lib/steep/errors.rb', line 516

def to_s
  "#{location_to_str}: IncompatibleTuple: expected_tuple=#{expected_tuple}"
end