lib/rasem/application.rb in rasem-0.5.1 vs lib/rasem/application.rb in rasem-0.5.2

- old
+ new

@@ -16,13 +16,14 @@ if source_file =~ /\.rasem$/ svg_file = source_file.sub(/\.rasem$/, '.svg') else svg_file = source_file + ".svg" end + img = Rasem::SVGImage.new(nil, "100%", "100%") do + eval(File.read(source_file), binding) + end File.open(svg_file, "w") do |f| - Rasem::SVGImage.new(f, 100, 100) do - eval(File.read(source_file), binding) - end + f << img.output end end return 0 end