Class: Sftp

Inherits:
Object
  • Object
show all
Defined in:
lib/wormholio/sftp.rb

Class Method Summary collapse

Class Method Details

.download(creds, local_path, filename) ⇒ Object



12
13
14
15
16
# File 'lib/wormholio/sftp.rb', line 12

def self.download(creds,local_path,filename)
  p 'SFTP DOWNLOAD'
  connect(creds)
  @wormholio_sftp.download!("#{creds['dir_path']}#{filename}","#{local_path}#{filename}")
end

.upload(creds, local_path, filename) ⇒ Object



6
7
8
9
10
# File 'lib/wormholio/sftp.rb', line 6

def self.upload(creds,local_path,filename)
  p 'SFTP UPLOAD'
  connect(creds)
  @wormholio_sftp.upload!("#{local_path}#{filename}","#{creds['dir_path']}#{filename}")
end