Class: PlatformosCheck::LanguageServer::ExecuteCommandEngine
- Inherits:
-
Object
- Object
- PlatformosCheck::LanguageServer::ExecuteCommandEngine
- Defined in:
- lib/platformos_check/language_server/execute_command_engine.rb
Instance Method Summary collapse
- #<<(provider) ⇒ Object
- #execute(command, arguments) ⇒ Object
-
#initialize ⇒ ExecuteCommandEngine
constructor
A new instance of ExecuteCommandEngine.
Constructor Details
#initialize ⇒ ExecuteCommandEngine
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 |