Class: Steep::Errors::ArgumentTypeMismatch

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:, expected:, actual:) ⇒ ArgumentTypeMismatch

Returns a new instance of ArgumentTypeMismatch.



92
93
94
95
96
97
# File 'lib/steep/errors.rb', line 92

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

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



89
90
91
# File 'lib/steep/errors.rb', line 89

def actual
  @actual
end

#expectedObject (readonly)

Returns the value of attribute expected.



88
89
90
# File 'lib/steep/errors.rb', line 88

def expected
  @expected
end

#nodeObject (readonly)

Returns the value of attribute node.



87
88
89
# File 'lib/steep/errors.rb', line 87

def node
  @node
end

#receiver_typeObject (readonly)

Returns the value of attribute receiver_type.



90
91
92
# File 'lib/steep/errors.rb', line 90

def receiver_type
  @receiver_type
end

Instance Method Details

#to_sObject



99
100
101
# File 'lib/steep/errors.rb', line 99

def to_s
  "#{location_to_str}: ArgumentTypeMismatch: receiver=#{receiver_type}, expected=#{expected}, actual=#{actual}"
end