Class: Steep::Errors::MethodDefinitionWithOverloading

Inherits:
Base
  • Object
show all
Defined in:
lib/steep/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#node

Instance Method Summary collapse

Methods inherited from Base

#location_to_str, #print_to

Constructor Details

#initialize(node:, method:) ⇒ MethodDefinitionWithOverloading

Returns a new instance of MethodDefinitionWithOverloading.



262
263
264
265
# File 'lib/steep/errors.rb', line 262

def initialize(node:, method:)
  super(node: node)
  @method = method
end

Instance Attribute Details

#methodObject (readonly)

Returns the value of attribute method.



260
261
262
# File 'lib/steep/errors.rb', line 260

def method
  @method
end

Instance Method Details

#to_sObject



267
268
269
# File 'lib/steep/errors.rb', line 267

def to_s
  "#{location_to_str}: MethodDefinitionWithOverloading: method=#{method.name}, types=#{method.types.join(" | ")}"
end