Class: Steep::Errors::ReturnTypeMismatch
- Includes:
- ResultPrinter
- 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.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(node:, expected:, actual:, result:) ⇒ ReturnTypeMismatch
constructor
A new instance of ReturnTypeMismatch.
- #to_s ⇒ Object
Methods included from ResultPrinter
Methods inherited from Base
Constructor Details
#initialize(node:, expected:, actual:, result:) ⇒ ReturnTypeMismatch
Returns a new instance of ReturnTypeMismatch.
146 147 148 149 150 151 |
# File 'lib/steep/errors.rb', line 146 def initialize(node:, expected:, actual:, result:) super(node: node) @expected = expected @actual = actual @result = result end |
Instance Attribute Details
#actual ⇒ Object (readonly)
Returns the value of attribute actual.
141 142 143 |
# File 'lib/steep/errors.rb', line 141 def actual @actual end |
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
140 141 142 |
# File 'lib/steep/errors.rb', line 140 def expected @expected end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
142 143 144 |
# File 'lib/steep/errors.rb', line 142 def result @result end |
Instance Method Details
#to_s ⇒ Object
153 154 155 |
# File 'lib/steep/errors.rb', line 153 def to_s "#{location_to_str}: ReturnTypeMismatch: expected=#{expected}, actual=#{actual}" end |