Class: ThemeCheck::LanguageServer::CodeActionProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/theme_check/language_server/code_action_provider.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(storage, diagnostics_manager) ⇒ CodeActionProvider

Returns a new instance of CodeActionProvider.



24
25
26
27
# File 'lib/theme_check/language_server/code_action_provider.rb', line 24

def initialize(storage, diagnostics_manager)
  @storage = storage
  @diagnostics_manager = diagnostics_manager
end

Instance Attribute Details

#diagnostics_managerObject (readonly)

Returns the value of attribute diagnostics_manager.



22
23
24
# File 'lib/theme_check/language_server/code_action_provider.rb', line 22

def diagnostics_manager
  @diagnostics_manager
end

#storageObject (readonly)

Returns the value of attribute storage.



21
22
23
# File 'lib/theme_check/language_server/code_action_provider.rb', line 21

def storage
  @storage
end

Class Method Details

.allObject



7
8
9
# File 'lib/theme_check/language_server/code_action_provider.rb', line 7

def all
  @all ||= []
end

.inherited(subclass) ⇒ Object



11
12
13
# File 'lib/theme_check/language_server/code_action_provider.rb', line 11

def inherited(subclass)
  all << subclass
end

.kind(k = nil) ⇒ Object



15
16
17
18
# File 'lib/theme_check/language_server/code_action_provider.rb', line 15

def kind(k = nil)
  @kind = k unless k.nil?
  @kind
end

Instance Method Details

#base_kindObject



33
34
35
# File 'lib/theme_check/language_server/code_action_provider.rb', line 33

def base_kind
  kind.split('.')[0]
end

#code_actions(relative_path, range) ⇒ Object

Raises:

  • (NotImplementedError)


37
38
39
# File 'lib/theme_check/language_server/code_action_provider.rb', line 37

def code_actions(relative_path, range)
  raise NotImplementedError
end

#kindObject



29
30
31
# File 'lib/theme_check/language_server/code_action_provider.rb', line 29

def kind
  self.class.kind
end