lib/import/shake_text.rb in tracksperanto-2.1.1 vs lib/import/shake_text.rb in tracksperanto-2.2.0
- old
+ new
@@ -3,14 +3,14 @@
def self.human_name
"Shake .txt tracker file"
end
- def stream_parse(io)
- io.each do | line |
+ def each
+ @io.each do | line |
if line =~ /TrackName (.+)/
- send_tracker(@last_tracker) if @last_tracker && @last_tracker.any?
+ yield(@last_tracker) if @last_tracker && @last_tracker.any?
@last_tracker = Tracksperanto::Tracker.new(:name => $1)
# Toss the next following string - header
io.gets
else
keyframe_values = line.split
@@ -23,9 +23,9 @@
:residual => (1 - keyframe_values[3].to_f)
)
end
end
- send_tracker(@last_tracker) if @last_tracker && @last_tracker.any?
+ yield(@last_tracker) if @last_tracker && @last_tracker.any?
end
end