instiki/vendor/plugins/rubyzip/samples/write_simple.rb
2009-12-23 02:19:16 -06:00

14 lines
192 B
Ruby
Executable file

#!/usr/bin/env ruby
$: << "../lib"
require 'zip/zip'
include Zip
ZipOutputStream.open('simple.zip') {
|zos|
ze = zos.put_next_entry 'entry.txt'
zos.puts "Hello world"
}