Class: Steep::Errors::IncompatibleTypeCase

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:, var_name:, result:, relation:) ⇒ IncompatibleTypeCase

Returns a new instance of IncompatibleTypeCase.



457
458
459
460
461
462
# File 'lib/steep/errors.rb', line 457

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

Instance Attribute Details

#relationObject (readonly)

Returns the value of attribute relation.



455
456
457
# File 'lib/steep/errors.rb', line 455

def relation
  @relation
end

#resultObject (readonly)

Returns the value of attribute result.



454
455
456
# File 'lib/steep/errors.rb', line 454

def result
  @result
end

#var_nameObject (readonly)

Returns the value of attribute var_name.



453
454
455
# File 'lib/steep/errors.rb', line 453

def var_name
  @var_name
end

Instance Method Details

#to_sObject



466
467
468
# File 'lib/steep/errors.rb', line 466

def to_s
  "#{location_to_str}: IncompatibleTypeCase: var_name=#{var_name}, #{relation}"
end