Method: IsoDoc::Function::Utils#save_svg

Defined in:
lib/isodoc/function/utils.rb

#save_svg(img) ⇒ Object



192
193
194
195
196
197
198
199
# File 'lib/isodoc/function/utils.rb', line 192

def save_svg(img)
  Tempfile.open(["image", ".svg"],
                mode: File::BINARY | File::SHARE_DELETE) do |f|
    f.write(img.to_xml)
    @tempfile_cache << f # persist to the end
    f.path
  end
end