lib/import/pftrack.rb in tracksperanto-2.1.1 vs lib/import/pftrack.rb in tracksperanto-2.2.0
- old
+ new
@@ -8,19 +8,19 @@
end
CHARACTERS_OR_QUOTES = /[AZaz"]/
INTS = /^\d+$/
- def stream_parse(io)
- until io.eof?
- line = io.gets
+ def each
+ until @io.eof?
+ line = @io.gets
next if (!line || line =~ /^#/)
if line =~ CHARACTERS_OR_QUOTES # Tracker with a name
t = Tracksperanto::Tracker.new(:name => unquote(line.strip))
report_progress("Reading tracker #{t.name}")
- parse_tracker(t, io)
- send_tracker(t)
+ parse_tracker(t, @io)
+ yield(t)
end
end
end
private
\ No newline at end of file