lib/revepast/parser/cargo_scan.rb in revepast-0.0.2 vs lib/revepast/parser/cargo_scan.rb in revepast-0.0.3
- old
+ new
@@ -1,15 +1,22 @@
module Revepast
module Parser
class CargoScan
- def initialize(str)
- @Utils = Utils.new
- @str = @Utils.sanitize(str)
- parse
+ autoload :Utils, 'revepast/parser'
+ include Revepast::Parser
+
+ attr_reader :result, :bad_lines
+
+ def initialize
+ @Utils = Utils.new
+ @result = {}
+ @bad_lines = []
+ result = parse
end
def parse
- p "wa are in CargoScan"
+ lines = @Utils.sanitize(Revepast.str)
+ @result, @bad_lines = @Utils.parse_listing(lines)
end
end
end
end
\ No newline at end of file