Class: Steep::Diagnostic::Ruby::FalseAssertion
- Defined in:
- lib/steep/diagnostic/ruby.rb
Instance Attribute Summary collapse
-
#assertion_type ⇒ Object
readonly
Returns the value of attribute assertion_type.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#node_type ⇒ Object
readonly
Returns the value of attribute node_type.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(node:, assertion_type:, node_type:) ⇒ FalseAssertion
constructor
A new instance of FalseAssertion.
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, assertion_type:, node_type:) ⇒ FalseAssertion
Returns a new instance of FalseAssertion.
840 841 842 843 844 |
# File 'lib/steep/diagnostic/ruby.rb', line 840 def initialize(node:, assertion_type:, node_type:) super(node: node) @assertion_type = assertion_type @node_type = node_type end |
Instance Attribute Details
#assertion_type ⇒ Object (readonly)
Returns the value of attribute assertion_type.
838 839 840 |
# File 'lib/steep/diagnostic/ruby.rb', line 838 def assertion_type @assertion_type end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
838 839 840 |
# File 'lib/steep/diagnostic/ruby.rb', line 838 def node @node end |
#node_type ⇒ Object (readonly)
Returns the value of attribute node_type.
838 839 840 |
# File 'lib/steep/diagnostic/ruby.rb', line 838 def node_type @node_type end |
Instance Method Details
#header_line ⇒ Object
846 847 848 |
# File 'lib/steep/diagnostic/ruby.rb', line 846 def header_line "Assertion cannot hold: no relationship between inferred type (`#{node_type.to_s}`) and asserted type (`#{assertion_type.to_s}`)" end |