Class: Steep::Diagnostic::Ruby::Base
- Includes:
- Helper
- Defined in:
- lib/steep/diagnostic/ruby.rb
Direct Known Subclasses
AnnotationSyntaxError, ArgumentTypeMismatch, BlockBodyTypeMismatch, BlockTypeMismatch, BreakTypeMismatch, ClassModuleMismatch, DeprecatedReference, DifferentMethodParameterKind, ElseOnExhaustiveCase, FallbackAny, FalseAssertion, ImplicitBreakValueMismatch, IncompatibleAnnotation, IncompatibleArgumentForwarding, IncompatibleAssignment, InsufficientKeywordArguments, InsufficientPositionalArguments, InsufficientTypeArgument, InvalidIgnoreComment, LibraryRBSError, MethodArityMismatch, MethodBodyTypeMismatch, MethodDefinitionInUndeclaredModule, MethodDefinitionMissing, MethodParameterMismatch, MethodReturnTypeAnnotationMismatch, MultipleAssignmentConversionError, NoMethod, ProcHintIgnored, ProcTypeExpected, RBSError, RedundantIgnoreComment, RequiredBlockMissing, ReturnTypeMismatch, SetterBodyTypeMismatch, SetterReturnTypeMismatch, SyntaxError, TypeArgumentMismatchError, UnannotatedEmptyCollection, UndeclaredMethodDefinition, UnexpectedBlockGiven, UnexpectedDynamicMethod, UnexpectedError, UnexpectedJump, UnexpectedJumpValue, UnexpectedKeywordArgument, UnexpectedPositionalArgument, UnexpectedSuper, UnexpectedTypeArgument, UnexpectedYield, UnknownConstant, UnknownConstantAssigned, UnknownGlobalVariable, UnknownInstanceVariable, UnknownRecordKey, UnreachableBranch, UnreachableValueBranch, UnresolvedOverloading, UnsatisfiableConstraint, UnsupportedSyntax
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
- #detail_lines ⇒ Object
- #diagnostic_code ⇒ Object
- #header_line ⇒ Object
-
#initialize(node:, location: node&.location&.expression) ⇒ Base
constructor
A new instance of Base.
Methods included from Helper
Constructor Details
#initialize(node:, location: node&.location&.expression) ⇒ Base
Returns a new instance of Base.
10 11 12 13 |
# File 'lib/steep/diagnostic/ruby.rb', line 10 def initialize(node:, location: node&.location&.expression) @node = node @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
8 9 10 |
# File 'lib/steep/diagnostic/ruby.rb', line 8 def location @location end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
7 8 9 |
# File 'lib/steep/diagnostic/ruby.rb', line 7 def node @node end |
Instance Method Details
#detail_lines ⇒ Object
19 20 21 |
# File 'lib/steep/diagnostic/ruby.rb', line 19 def detail_lines nil end |
#diagnostic_code ⇒ Object
23 24 25 |
# File 'lib/steep/diagnostic/ruby.rb', line 23 def diagnostic_code "Ruby::#{error_name}" end |
#header_line ⇒ Object
15 16 17 |
# File 'lib/steep/diagnostic/ruby.rb', line 15 def header_line error_name end |