Class: PlatformosCheck::LanguageServer::ExecuteCommandEngine

Inherits:
Object
  • Object
show all
Defined in:
lib/platformos_check/language_server/execute_command_engine.rb

Instance Method Summary collapse

Constructor Details

#initializeExecuteCommandEngine

Returns a new instance of ExecuteCommandEngine.



6
7
8
# File 'lib/platformos_check/language_server/execute_command_engine.rb', line 6

def initialize
  @providers = {}
end

Instance Method Details

#<<(provider) ⇒ Object



10
11
12
# File 'lib/platformos_check/language_server/execute_command_engine.rb', line 10

def <<(provider)
  @providers[provider.command] = provider
end

#execute(command, arguments) ⇒ Object



14
15
16
# File 'lib/platformos_check/language_server/execute_command_engine.rb', line 14

def execute(command, arguments)
  @providers[command].execute(arguments)
end