Class: OrionWholesale::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/orion_wholesale/base.rb

Direct Known Subclasses

Catalog, Category, Inventory, Order, Tracking, User

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