Class: RestFtpDaemon::Remote
- Inherits:
-
Object
- Object
- RestFtpDaemon::Remote
- Includes:
- LoggerHelper
- Defined in:
- lib/rest-ftp-daemon/remote.rb
Overview
Handles transfers for Job class
Direct Known Subclasses
Instance Attribute Summary collapse
-
#log_context ⇒ Object
readonly
Returns the value of attribute log_context.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
- #close ⇒ Object
- #connect ⇒ Object
-
#initialize(url, log_context, options = {}) ⇒ Remote
constructor
A new instance of Remote.
Constructor Details
#initialize(url, log_context, options = {}) ⇒ Remote
Returns a new instance of Remote.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rest-ftp-daemon/remote.rb', line 9 def initialize url, log_context, = {} # Logger @log_context = log_context || {} @logger = RestFtpDaemon::LoggerPool.instance.get :jobs # Extract URL parts @url = url @url.user ||= "anonymous" # Annnounce object log_info "Remote.initialize [#{url}]" end |
Instance Attribute Details
#log_context ⇒ Object (readonly)
Returns the value of attribute log_context.
7 8 9 |
# File 'lib/rest-ftp-daemon/remote.rb', line 7 def log_context @log_context end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
6 7 8 |
# File 'lib/rest-ftp-daemon/remote.rb', line 6 def logger @logger end |
Instance Method Details
#close ⇒ Object
27 28 29 30 |
# File 'lib/rest-ftp-daemon/remote.rb', line 27 def close # Debug mode ? puts "-------------------- SESSION CLOSING --------------------------" if @debug end |
#connect ⇒ Object
22 23 24 25 |
# File 'lib/rest-ftp-daemon/remote.rb', line 22 def connect # Debug mode ? debug_header if @debug end |