Class: Steep::Errors::ArgumentTypeMismatch
- Defined in:
- lib/steep/errors.rb
Instance Attribute Summary collapse
-
#actual ⇒ Object
readonly
Returns the value of attribute actual.
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#receiver_type ⇒ Object
readonly
Returns the value of attribute receiver_type.
Instance Method Summary collapse
-
#initialize(node:, receiver_type:, expected:, actual:) ⇒ ArgumentTypeMismatch
constructor
A new instance of ArgumentTypeMismatch.
- #to_s ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(node:, receiver_type:, expected:, actual:) ⇒ ArgumentTypeMismatch
Returns a new instance of ArgumentTypeMismatch.
83 84 85 86 87 88 |
# File 'lib/steep/errors.rb', line 83 def initialize(node:, receiver_type:, expected:, actual:) super(node: node) @receiver_type = receiver_type @expected = expected @actual = actual end |
Instance Attribute Details
#actual ⇒ Object (readonly)
Returns the value of attribute actual.
80 81 82 |
# File 'lib/steep/errors.rb', line 80 def actual @actual end |
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
79 80 81 |
# File 'lib/steep/errors.rb', line 79 def expected @expected end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
78 79 80 |
# File 'lib/steep/errors.rb', line 78 def node @node end |
#receiver_type ⇒ Object (readonly)
Returns the value of attribute receiver_type.
81 82 83 |
# File 'lib/steep/errors.rb', line 81 def receiver_type @receiver_type end |
Instance Method Details
#to_s ⇒ Object
90 91 92 |
# File 'lib/steep/errors.rb', line 90 def to_s "#{location_to_str}: ArgumentTypeMismatch: receiver=#{receiver_type}, expected=#{expected}, actual=#{actual}" end |