Class: Steep::Errors::IncompatibleAnnotation

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

Returns a new instance of IncompatibleAnnotation.



438
439
440
441
442
443
# File 'lib/steep/errors.rb', line 438

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.



436
437
438
# File 'lib/steep/errors.rb', line 436

def relation
  @relation
end

#resultObject (readonly)

Returns the value of attribute result.



435
436
437
# File 'lib/steep/errors.rb', line 435

def result
  @result
end

#var_nameObject (readonly)

Returns the value of attribute var_name.



434
435
436
# File 'lib/steep/errors.rb', line 434

def var_name
  @var_name
end

Instance Method Details

#to_sObject



447
448
449
# File 'lib/steep/errors.rb', line 447

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