Class: Steep::Diagnostic::Ruby::ElseOnExhaustiveCase
- Defined in:
- lib/steep/diagnostic/deprecated/else_on_exhaustive_case.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(node:, type:) ⇒ ElseOnExhaustiveCase
constructor
A new instance of ElseOnExhaustiveCase.
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, type:) ⇒ ElseOnExhaustiveCase
Returns a new instance of ElseOnExhaustiveCase.
9 10 11 12 |
# File 'lib/steep/diagnostic/deprecated/else_on_exhaustive_case.rb', line 9 def initialize(node:, type:) super(node: node) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/steep/diagnostic/deprecated/else_on_exhaustive_case.rb', line 7 def type @type end |
Instance Method Details
#header_line ⇒ Object
14 15 16 |
# File 'lib/steep/diagnostic/deprecated/else_on_exhaustive_case.rb', line 14 def header_line "The branch is unreachable because the condition is exhaustive" end |