Class: Fog::SCP::Mock
- Inherits:
-
Object
- Object
- Fog::SCP::Mock
- Defined in:
- lib/fog/core/scp.rb
Class Method Summary (collapse)
Instance Method Summary (collapse)
- - (Object) download(remote_path, local_path, download_options = {})
-
- (Mock) initialize(address, username, options)
constructor
A new instance of Mock.
- - (Object) upload(local_path, remote_path, upload_options = {})
Constructor Details
- (Mock) initialize(address, username, options)
A new instance of Mock
20 21 22 23 24 |
# File 'lib/fog/core/scp.rb', line 20 def initialize(address, username, ) @address = address @username = username @options = end |
Class Method Details
+ (Object) data
14 15 16 17 18 |
# File 'lib/fog/core/scp.rb', line 14 def self.data @data ||= Hash.new do |hash, key| hash[key] = [] end end |
Instance Method Details
- (Object) download(remote_path, local_path, download_options = {})
34 35 36 37 38 39 40 |
# File 'lib/fog/core/scp.rb', line 34 def download(remote_path, local_path, = {}) self.class.data[@address] << { :username => @username, :options => @options, :remote_path => remote_path, :local_path => local_path, :download_options => } end |
- (Object) upload(local_path, remote_path, upload_options = {})
26 27 28 29 30 31 32 |
# File 'lib/fog/core/scp.rb', line 26 def upload(local_path, remote_path, = {}) self.class.data[@address] << { :username => @username, :options => @options, :local_path => local_path, :remote_path => remote_path, :upload_options => } end |