Class: Steep::Diagnostic::Ruby::ArgumentTypeMismatch
- 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.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#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:) ⇒ ArgumentTypeMismatch
constructor
A new instance of ArgumentTypeMismatch.
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:) ⇒ ArgumentTypeMismatch
Returns a new instance of ArgumentTypeMismatch.
225 226 227 228 229 230 |
# File 'lib/steep/diagnostic/ruby.rb', line 225 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.
220 221 222 |
# File 'lib/steep/diagnostic/ruby.rb', line 220 def actual @actual end |
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
219 220 221 |
# File 'lib/steep/diagnostic/ruby.rb', line 219 def expected @expected end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
218 219 220 |
# File 'lib/steep/diagnostic/ruby.rb', line 218 def node @node end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
221 222 223 |
# File 'lib/steep/diagnostic/ruby.rb', line 221 def result @result end |
Instance Method Details
#header_line ⇒ Object
232 233 234 |
# File 'lib/steep/diagnostic/ruby.rb', line 232 def header_line "Cannot pass a value of type `#{actual}` as an argument of type `#{expected}`" end |