Class: Steep::Diagnostic::Ruby::BlockTypeMismatch
- Includes:
- ResultPrinter
- Defined in:
- lib/steep/diagnostic/ruby.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
- #header_line ⇒ Object
-
#initialize(node:, expected:, actual:, result:) ⇒ BlockTypeMismatch
constructor
A new instance of BlockTypeMismatch.
Methods included from ResultPrinter
#detail_lines, #relation_message
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, expected:, actual:, result:) ⇒ BlockTypeMismatch
Returns a new instance of BlockTypeMismatch.
332 333 334 335 336 337 |
# File 'lib/steep/diagnostic/ruby.rb', line 332 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.
327 328 329 |
# File 'lib/steep/diagnostic/ruby.rb', line 327 def actual @actual end |
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
326 327 328 |
# File 'lib/steep/diagnostic/ruby.rb', line 326 def expected @expected end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
328 329 330 |
# File 'lib/steep/diagnostic/ruby.rb', line 328 def result @result end |
Instance Method Details
#header_line ⇒ Object
339 340 341 |
# File 'lib/steep/diagnostic/ruby.rb', line 339 def header_line "Cannot pass a value of type `#{actual}` as a block-pass-argument of type `#{expected}`" end |