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.
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
#actual ⇒ Object (readonly)
Returns the value of attribute actual.
89 90 91 |
# File 'lib/steep/errors.rb', line 89 def actual @actual end |
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
88 89 90 |
# File 'lib/steep/errors.rb', line 88 def expected @expected end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
87 88 89 |
# File 'lib/steep/errors.rb', line 87 def node @node end |
#receiver_type ⇒ Object (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_s ⇒ Object
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 |