Module: Fog::SSH

Defined in:
lib/fog/ssh.rb

Defined Under Namespace

Classes: Mock, Real, Result

Class Method Summary collapse

Class Method Details

.new(address, username, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/fog/ssh.rb', line 4

def self.new(address, username, options = {})
  unless options[:keys] || options[:password]
    raise ArgumentError.new(':keys or :password are required to initialize SSH')
  end
  if Fog.mocking?
    Fog::SSH::Mock.new(address, username, options)
  else
    Fog::SSH::Real.new(address, username, options)
  end
end

.reset_data(keys = Mock.data.keys) ⇒ Object



15
16
17
# File 'lib/fog/ssh.rb', line 15

def self.reset_data(keys=Mock.data.keys)
  Mock.reset_data(keys)
end