Sha256: aca88e8b5d613760b6b5cf98ce1c3d4cd2f060588b7b12e9ed66c8a6d650e2e5

Contents?: true

Size: 551 Bytes

Versions: 10

Compression:

Stored size: 551 Bytes

Contents

class PgExport
  class FtpService
    class Connection
      include Logging

      attr_reader :ftp

      def initialize(host:, user:, password:)
        @host, @user, @password = host, user, password
        open
      end

      def open
        @ftp = Net::FTP.new(host, user, password)
        @ftp.passive = true
        logger.info "Connect to #{host}"
        self
      end

      def close
        @ftp.close
        logger.info 'Close FTP'
        self
      end

      private

      attr_reader :host, :user, :password
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
pg_export-0.4.1 lib/pg_export/services/ftp_service/connection.rb
pg_export-0.4.0 lib/pg_export/services/ftp_service/connection.rb
pg_export-0.3.2 lib/pg_export/services/ftp_service/connection.rb
pg_export-0.3.1 lib/pg_export/services/ftp_service/connection.rb
pg_export-0.3.0 lib/pg_export/services/ftp_service/connection.rb
pg_export-0.2.0 lib/pg_export/ftp_service/connection.rb
pg_export-0.1.3 lib/pg_export/ftp_service/connection.rb
pg_export-0.1.2 lib/pg_export/ftp_service/connection.rb
pg_export-0.1.1 lib/pg_export/ftp_service/connection.rb
pg_export-0.1.0 lib/pg_export/ftp_service/connection.rb