instiki/vendor/plugins/rubyzip-0.9.1/samples/write_simple.rb

14 lines
192 B
Ruby
Raw Normal View History

#!/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"
}