Class: Solargraph::TypeChecker::Problem

Inherits:
Object
  • Object
show all
Defined in:
lib/solargraph/type_checker/problem.rb

Overview

A problem reported by TypeChecker.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location, message, pin: nil, suggestion: nil) ⇒ Problem

Returns a new instance of Problem.

Parameters:



26
27
28
29
30
31
# File 'lib/solargraph/type_checker/problem.rb', line 26

def initialize location, message, pin: nil, suggestion: nil
  @location = location
  @message = message
  @pin = pin
  @suggestion = suggestion
end

Instance Attribute Details

#locationSolargraph::Location (readonly)

TODO:

Missed nil violation



10
11
12
# File 'lib/solargraph/type_checker/problem.rb', line 10

def location
  @location
end

#messageString (readonly)

Returns:

  • (String)


13
14
15
# File 'lib/solargraph/type_checker/problem.rb', line 13

def message
  @message
end

#pinPin::Base (readonly)

TODO:

Missed nil violation

Returns:



17
18
19
# File 'lib/solargraph/type_checker/problem.rb', line 17

def pin
  @pin
end

#suggestionString? (readonly)

Returns:

  • (String, nil)


20
21
22
# File 'lib/solargraph/type_checker/problem.rb', line 20

def suggestion
  @suggestion
end