Class: Steep::Diagnostic::Signature::Base

Inherits:
Object
  • Object
show all
Includes:
Helper
Defined in:
lib/steep/diagnostic/signature.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helper

#error_name, #full_message

Constructor Details

#initialize(location:) ⇒ Base

Returns a new instance of Base.



9
10
11
# File 'lib/steep/diagnostic/signature.rb', line 9

def initialize(location:)
  @location = location
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



7
8
9
# File 'lib/steep/diagnostic/signature.rb', line 7

def location
  @location
end

Instance Method Details

#detail_linesObject



17
18
19
# File 'lib/steep/diagnostic/signature.rb', line 17

def detail_lines
  nil
end

#diagnostic_codeObject



21
22
23
# File 'lib/steep/diagnostic/signature.rb', line 21

def diagnostic_code
  "RBS::#{error_name}"
end

#header_lineObject



13
14
15
# File 'lib/steep/diagnostic/signature.rb', line 13

def header_line
  raise
end

#pathObject



25
26
27
28
29
# File 'lib/steep/diagnostic/signature.rb', line 25

def path
  if location
    Pathname(location.buffer.name)
  end
end