Class: OrionWholesale::Base
- Inherits:
-
Object
- Object
- OrionWholesale::Base
show all
- Defined in:
- lib/orion_wholesale/base.rb
Class Method Summary
collapse
Class Method Details
.connect(options = {}) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/orion_wholesale/base.rb', line 4
def self.connect(options = {})
requires!(options, :username, :password)
Net::SFTP.start(OrionWholesale.config.ftp_host, options[:username], password: options[:password], port: OrionWholesale.config.ftp_port) do |sftp|
yield(sftp)
end
end
|