lib/bill_hicks/inventory.rb in bill_hicks-0.2.2 vs lib/bill_hicks/inventory.rb in bill_hicks-1.0.0
- old
+ new
@@ -8,11 +8,10 @@
# }
class Inventory < Base
INVENTORY_FILENAME = 'billhicksinventory.csv'
-
def initialize(options = {})
requires!(options, :username, :password)
@options = options
end
@@ -24,10 +23,10 @@
# Returns an array of hashes with the inventory item details.
def all
inventory = []
connect(@options) do |ftp|
- ftp.chdir(FTP_DIR)
+ ftp.chdir(BillHicks.config.top_level_dir)
lines = ftp.gettextfile(INVENTORY_FILENAME, nil)
CSV.parse(lines, headers: :first_row) do |row|
inventory << {