Class: Steep::Errors::IncompatibleArguments

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#location_to_str, #print_to

Constructor Details

#initialize(node:, receiver_type:, method_type:) ⇒ IncompatibleArguments

Returns a new instance of IncompatibleArguments.



57
58
59
60
61
# File 'lib/steep/errors.rb', line 57

def initialize(node:, receiver_type:, method_type:)
  super(node: node)
  @receiver_type = receiver_type
  @method_type = method_type
end

Instance Attribute Details

#method_typeObject (readonly)

Returns the value of attribute method_type.



55
56
57
# File 'lib/steep/errors.rb', line 55

def method_type
  @method_type
end

#nodeObject (readonly)

Returns the value of attribute node.



53
54
55
# File 'lib/steep/errors.rb', line 53

def node
  @node
end

#receiver_typeObject (readonly)

Returns the value of attribute receiver_type.



54
55
56
# File 'lib/steep/errors.rb', line 54

def receiver_type
  @receiver_type
end

Instance Method Details

#to_sObject



63
64
65
# File 'lib/steep/errors.rb', line 63

def to_s
  "#{location_to_str}: IncompatibleArguments: receiver=#{receiver_type}, method_type=#{method_type}"
end