Class: Rubocop::Language::Server::State
- Inherits:
-
Object
- Object
- Rubocop::Language::Server::State
- Defined in:
- lib/rubocop/language/server/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.
7 8 9 10 11 |
# File 'lib/rubocop/language/server/state.rb', line 7 def initialize(uri:, text:, diagnostics: []) @uri = uri @text = text @diagnostics = diagnostics end |
Instance Attribute Details
#diagnostics ⇒ Object (readonly)
Returns the value of attribute diagnostics.
5 6 7 |
# File 'lib/rubocop/language/server/state.rb', line 5 def diagnostics @diagnostics end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
5 6 7 |
# File 'lib/rubocop/language/server/state.rb', line 5 def text @text end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
5 6 7 |
# File 'lib/rubocop/language/server/state.rb', line 5 def uri @uri end |
Instance Method Details
#code_actions(line_range) ⇒ Object
13 14 15 |
# File 'lib/rubocop/language/server/state.rb', line 13 def code_actions(line_range) diagnostics.code_actions(line_range) end |