lib/export/equalizer3.rb in tracksperanto-1.5.0 vs lib/export/equalizer3.rb in tracksperanto-1.5.1
- old
+ new
@@ -1,7 +1,5 @@
-require 'tempfile'
-
# Export for 3DE v3 point files
class Tracksperanto::Export::Equalizer3 < Tracksperanto::Export::Base
HEADER = '// 3DE Multiple Tracking Curves Export 2048 x 778 * 275 frames'
@@ -33,10 +31,15 @@
def end_export
preamble = HEADER.gsub(/2048/, @w.to_s).gsub(/778/, @h.to_s).gsub(/275/, @highest_keyframe.to_s)
@io.puts(preamble)
@internal_io.rewind
@io.puts(@internal_io.read)
- @internal_io = nil # Discard for GC
- @io.puts("")
+ discard_io
+ @io.puts("") # Newline at end
end
+ private
+ def discard_io
+ @internal_io.close
+ @internal_io = nil
+ end
end