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.



66
67
68
69
70
# File 'lib/steep/errors.rb', line 66

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.



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

def method_type
  @method_type
end

#nodeObject (readonly)

Returns the value of attribute node.



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

def node
  @node
end

#receiver_typeObject (readonly)

Returns the value of attribute receiver_type.



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

def receiver_type
  @receiver_type
end

Instance Method Details

#to_sObject



72
73
74
# File 'lib/steep/errors.rb', line 72

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