Class: Fog::SSH::Mock
- Inherits:
-
Object
- Object
- Fog::SSH::Mock
- Defined in:
- lib/fog/core/ssh.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(address, username, options) ⇒ Mock
constructor
A new instance of Mock.
- #run(commands, &_blk) ⇒ Object
Constructor Details
#initialize(address, username, options) ⇒ Mock
Returns a new instance of Mock.
24 25 26 27 28 |
# File 'lib/fog/core/ssh.rb', line 24 def initialize(address, username, ) @address = address @username = username @options = end |
Class Method Details
.data ⇒ Object
14 15 16 17 18 |
# File 'lib/fog/core/ssh.rb', line 14 def self.data @data ||= Hash.new do |hash, key| hash[key] = [] end end |
.reset ⇒ Object
20 21 22 |
# File 'lib/fog/core/ssh.rb', line 20 def self.reset @data = nil end |
Instance Method Details
#run(commands, &_blk) ⇒ Object
30 31 32 |
# File 'lib/fog/core/ssh.rb', line 30 def run(commands, &_blk) self.class.data[@address] << { :commands => commands, :username => @username, :options => @options } end |