Class: ODisk::Copier
- Inherits:
-
Opee::Actor
- Object
- Opee::Actor
- ODisk::Copier
- Defined in:
- lib/odisk/copier.rb
Overview
Provides upload and download functionality using sftp and ssh on a single connection.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(options = {}) ⇒ Copier
constructor
A new instance of Copier.
- #set_options(options) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Copier
Returns a new instance of Copier.
13 14 15 16 17 18 |
# File 'lib/odisk/copier.rb', line 13 def initialize(={}) @ftp = nil @ssh = nil super() @copy_queue.ask(:ready, self) end |
Instance Method Details
#close ⇒ Object
27 28 29 30 31 32 |
# File 'lib/odisk/copier.rb', line 27 def close() @ftp.close_channel() unless @ftp.nil? @ftp = nil @ssh.close() unless @ssh.nil? super() end |
#set_options(options) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/odisk/copier.rb', line 20 def () super() @copy_queue = [:copy_queue] @crypt_queue = [:crypt_queue] @fixer = [:fixer] end |