Class: State
- Inherits:
-
Object
- Object
- State
- Defined in:
- lib/rubocop/lsp/state.rb
Instance Attribute Summary collapse
-
#diagnostics ⇒ Object
readonly
Returns the value of attribute diagnostics.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #code_actions(line_range) ⇒ Object
-
#initialize(uri:, text:, diagnostics: []) ⇒ State
constructor
A new instance of State.
Constructor Details
#initialize(uri:, text:, diagnostics: []) ⇒ State
Returns a new instance of State.
6 7 8 9 10 |
# File 'lib/rubocop/lsp/state.rb', line 6 def initialize(uri:, text:, diagnostics: []) @uri = uri @text = text @diagnostics = diagnostics end |
Instance Attribute Details
#diagnostics ⇒ Object (readonly)
Returns the value of attribute diagnostics.
4 5 6 |
# File 'lib/rubocop/lsp/state.rb', line 4 def diagnostics @diagnostics end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
4 5 6 |
# File 'lib/rubocop/lsp/state.rb', line 4 def text @text end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
4 5 6 |
# File 'lib/rubocop/lsp/state.rb', line 4 def uri @uri end |
Instance Method Details
#code_actions(line_range) ⇒ Object
12 13 14 |
# File 'lib/rubocop/lsp/state.rb', line 12 def code_actions(line_range) diagnostics.code_actions(line_range) end |