File: write_simple.rb

package info (click to toggle)
ruby-zip 1.1.6-1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 720 kB
  • ctags: 929
  • sloc: ruby: 7,045; makefile: 11
file content (13 lines) | stat: -rwxr-xr-x 185 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env ruby

$: << "../lib"

require 'zip'

include Zip

OutputStream.open('simple.zip') {
  |zos|
  ze = zos.put_next_entry 'entry.txt'
  zos.puts "Hello world"
}