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)
-
- (Mock) initialize(address, username, options)
constructor
A new instance of Mock.
- - (Object) run(commands, &blk)
Constructor Details
- (Mock) initialize(address, username, options)
A new instance of Mock
26 27 28 29 30 |
# File 'lib/fog/core/ssh.rb', line 26 def initialize(address, username, ) @address = address @username = username @options = end |
Class Method Details
+ (Object) data
16 17 18 19 20 |
# File 'lib/fog/core/ssh.rb', line 16 def self.data @data ||= Hash.new do |hash, key| hash[key] = [] end end |
+ (Object) reset
22 23 24 |
# File 'lib/fog/core/ssh.rb', line 22 def self.reset @data= nil end |
Instance Method Details
- (Object) run(commands, &blk)
32 33 34 |
# File 'lib/fog/core/ssh.rb', line 32 def run(commands, &blk) self.class.data[@address] << {:commands => commands, :username => @username, :options => @options} end |