Class: PgExport::Ftp::Connection
- Inherits:
-
Object
- Object
- PgExport::Ftp::Connection
- Defined in:
- lib/pg_export/ftp/connection.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
Instance Method Summary collapse
- #close ⇒ Object
- #ftp ⇒ Object
-
#initialize(host:, user:, password:, logger:) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(host:, user:, password:, logger:) ⇒ Connection
Returns a new instance of Connection.
8 9 10 11 |
# File 'lib/pg_export/ftp/connection.rb', line 8 def initialize(host:, user:, password:, logger:) @host, @user, @password, @logger = host, user, password, logger open_ftp_thread end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
6 7 8 |
# File 'lib/pg_export/ftp/connection.rb', line 6 def host @host end |
Instance Method Details
#close ⇒ Object
18 19 20 21 22 |
# File 'lib/pg_export/ftp/connection.rb', line 18 def close ftp.close logger.info 'Close FTP' self end |
#ftp ⇒ Object
13 14 15 16 |
# File 'lib/pg_export/ftp/connection.rb', line 13 def ftp open_ftp_thread.join @ftp end |