Sha256: 3d8138a1ce2a49726a50df9fa538da673128454e213dcd978970643085b81acd

Contents?: true

Size: 410 Bytes

Versions: 1

Compression:

Stored size: 410 Bytes

Contents

class ExportWriter
  def initialize(temp_file)
    @zip = Zip::File.open(temp_file.path, Zip::File::CREATE)
  end

  def close
    @zip.close
  end

  def write_to_zip(filename, content)
    @zip.get_output_stream(filename) do |file|
      file << content.to_json
    end
  end

  def write_asset_to_zip(filename, content)
    @zip.get_output_stream(filename) do |file|
      file << content
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
canvas_qti_to_learnosity_converter-3.0.0 lib/canvas_qti_to_learnosity_converter/export_writer.rb