Class: Steep::Errors::IncompatibleMethodTypeAnnotation

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:, interface_method:, annotation_method:, result:) ⇒ IncompatibleMethodTypeAnnotation

Returns a new instance of IncompatibleMethodTypeAnnotation.



247
248
249
250
251
252
# File 'lib/steep/errors.rb', line 247

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

Instance Attribute Details

#annotation_methodObject (readonly)

Returns the value of attribute annotation_method.



242
243
244
# File 'lib/steep/errors.rb', line 242

def annotation_method
  @annotation_method
end

#interface_methodObject (readonly)

Returns the value of attribute interface_method.



241
242
243
# File 'lib/steep/errors.rb', line 241

def interface_method
  @interface_method
end

#resultObject (readonly)

Returns the value of attribute result.



243
244
245
# File 'lib/steep/errors.rb', line 243

def result
  @result
end

Instance Method Details

#to_sObject



254
255
256
# File 'lib/steep/errors.rb', line 254

def to_s
  "#{location_to_str}: IncompatibleMethodTypeAnnotation: interface_method=#{interface_method.type_name}.#{interface_method.name}, annotation_method=#{annotation_method.name}"
end