class Fog::SCP::Mock

Public Class Methods

data() click to toggle source
# File lib/fog/core/scp.rb, line 12
def self.data
  @data ||= Hash.new do |hash, key|
    hash[key] = []
  end
end
new(address, username, options) click to toggle source
# File lib/fog/core/scp.rb, line 18
def initialize(address, username, options)
  @address  = address
  @username = username
  @options  = options
end

Public Instance Methods

download(remote_path, local_path, download_options = {}) click to toggle source
# File lib/fog/core/scp.rb, line 34
def download(remote_path, local_path, download_options = {})
  self.class.data[@address] << {
    username: @username,
    options: @options,
    remote_path: remote_path,
    local_path: local_path,
    download_options: download_options
  }
end
upload(local_path, remote_path, upload_options = {}) click to toggle source
# File lib/fog/core/scp.rb, line 24
def upload(local_path, remote_path, upload_options = {})
  self.class.data[@address] << {
    username: @username,
    options: @options,
    local_path: local_path,
    remote_path: remote_path,
    upload_options: upload_options
  }
end