lib/itunes_parser.rb in itunes_parser-1.0.3 vs lib/itunes_parser.rb in itunes_parser-1.1.0

- old
+ new

@@ -2,12 +2,14 @@ module ItunesParser class << self def new(args) - library_file = open(args[:library_dir]) - plist = PList.new(file: library_file) - library_file.close + raise ArgumentError, 'No Library file specified' if args[:file].nil? || args[:file].empty? + + xml_file = open(args[:file]) + plist = PList.new(file: xml_file) + xml_file.close plist end end end