File: write_simple.rb

package info (click to toggle)
ruby-zip 3.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,120 kB
  • sloc: ruby: 9,958; makefile: 23
file content (11 lines) | stat: -rwxr-xr-x 198 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH << '../lib'

require 'zip'

Zip::OutputStream.open('simple.zip') do |zos|
  zos.put_next_entry 'entry.txt'
  zos.puts 'Hello world'
end