Class: RemoteExecutionProvider

Inherits:
Object
  • Object
show all
Defined in:
app/models/remote_execution_provider.rb

Direct Known Subclasses

SSHExecutionProvider

Class Method Summary collapse

Class Method Details

.provider_for(type) ⇒ Object



2
3
4
# File 'app/models/remote_execution_provider.rb', line 2

def self.provider_for(type)
  providers[type.to_s] || providers[:Ssh]
end

.provider_namesObject



14
15
16
# File 'app/models/remote_execution_provider.rb', line 14

def self.provider_names
  providers.keys.map(&:to_s)
end

.providersObject



6
7
8
# File 'app/models/remote_execution_provider.rb', line 6

def self.providers
  @providers ||= { :Ssh => N_(SSHExecutionProvider) }.with_indifferent_access
end

.register(key, klass) ⇒ Object



10
11
12
# File 'app/models/remote_execution_provider.rb', line 10

def self.register(key, klass)
  providers[key.to_sym] = klass
end