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.



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

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.



464
465
466
# File 'lib/steep/errors.rb', line 464

def relation
  @relation
end

#resultObject (readonly)

Returns the value of attribute result.



463
464
465
# File 'lib/steep/errors.rb', line 463

def result
  @result
end

#var_nameObject (readonly)

Returns the value of attribute var_name.



462
463
464
# File 'lib/steep/errors.rb', line 462

def var_name
  @var_name
end

Instance Method Details

#to_sObject



475
476
477
# File 'lib/steep/errors.rb', line 475

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