Class: Squarespace::Sync::Connection

Inherits:
Thor
  • Object
show all
Defined in:
lib/squarespace/sync/connection.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Connection

Returns a new instance of Connection.



7
8
9
10
11
12
13
# File 'lib/squarespace/sync/connection.rb', line 7

def initialize(&block)
  options = Squarespace::Sync.options

  Net::SFTP.start(options[:host], options[:username], password: options[:password], port: options[:port]) do |sftp|
    block.call( sftp, options, self )
  end
end