Class: Steep::Diagnostic::Ruby::LibraryRBSError
- Defined in:
- lib/steep/diagnostic/ruby.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Attributes inherited from Base
Instance Method Summary collapse
- #detail_lines ⇒ Object
- #header_line ⇒ Object
-
#initialize(error:, location:) ⇒ LibraryRBSError
constructor
A new instance of LibraryRBSError.
Methods inherited from Base
Methods included from Helper
Constructor Details
#initialize(error:, location:) ⇒ LibraryRBSError
Returns a new instance of LibraryRBSError.
950 951 952 953 |
# File 'lib/steep/diagnostic/ruby.rb', line 950 def initialize(error:, location:) @error = error super(node: nil, location: location) end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
948 949 950 |
# File 'lib/steep/diagnostic/ruby.rb', line 948 def error @error end |
Instance Method Details
#detail_lines ⇒ Object
959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'lib/steep/diagnostic/ruby.rb', line 959 def detail_lines lines = [] #: Array[String] lines << error.header_line if error.location lines << "(#{error.location.buffer.name.to_s}:#{error.location.start_line}:#{error.location.start_column})" end if detail = error.detail_lines lines << "" << detail end lines.join("\n") end |
#header_line ⇒ Object
955 956 957 |
# File 'lib/steep/diagnostic/ruby.rb', line 955 def header_line "Type checking failed due to error in library RBS file" end |