Class: Steep::Diagnostic::Ruby::UnreachableValueBranch
- Defined in:
- lib/steep/diagnostic/ruby.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:, location: node.location.expression) ⇒ UnreachableValueBranch
constructor
A new instance of UnreachableValueBranch.
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, type:, location: node.location.expression) ⇒ UnreachableValueBranch
Returns a new instance of UnreachableValueBranch.
720 721 722 723 |
# File 'lib/steep/diagnostic/ruby.rb', line 720 def initialize(node:, type:, location: node.location.expression) super(node: node, location: location) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
718 719 720 |
# File 'lib/steep/diagnostic/ruby.rb', line 718 def type @type end |
Instance Method Details
#header_line ⇒ Object
725 726 727 |
# File 'lib/steep/diagnostic/ruby.rb', line 725 def header_line "The branch may evaluate to a value of `#{type}` but unreachable" end |