From 055abed0e28681387377671bc16d40d075e3aaf7 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Wed, 10 Aug 2016 21:16:44 -0400 Subject: update documentation --- Zip/Writer.html | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) (limited to 'Zip/Writer.html') diff --git a/Zip/Writer.html b/Zip/Writer.html index c28c13e..894055d 100644 --- a/Zip/Writer.html +++ b/Zip/Writer.html @@ -255,14 +255,14 @@ return the number of bytes written.

Example:

-

# create IO from "/path/to/bar.txt" -File.open("/path/to/bar.txt, "rb") do |io| -# write to "foo.zip" -Zip.write("foo.zip") do |zip| -# add "bar.txt" with contents of given IO -zip.add("bar.txt", io) -end -end

+
# create IO from "/path/to/bar.txt"
+File.open("/path/to/bar.txt, "rb") do |io|
+  # write to "foo.zip"
+  Zip.write("foo.zip") do |zip|
+    # add "bar.txt" with contents of given IO
+    zip.add("bar.txt", io)
+  end
+end

@@ -283,11 +283,11 @@ written.

Example:

-

# write to "foo.zip" -Zip.write("foo.zip") do |zip| -# add "bar.txt" with contents "hello!" -zip.add("bar.txt", "hello!") -end

+
# write to "foo.zip"
+Zip.write("foo.zip") do |zip|
+  # add "bar.txt" with contents "hello!"
+  zip.add("bar.txt", "hello!")
+end

@@ -308,11 +308,11 @@ of bytes written.

Example:

-

# write to "foo.zip" -Zip.write("foo.zip") do |zip| -# add local file "/path/to/bar.txt" as "bar.txt" -zip.add_file("bar.txt", "/path/to/bar.txt") -end

+
# write to "foo.zip"
+Zip.write("foo.zip") do |zip|
+  # add local file "/path/to/bar.txt" as "bar.txt"
+  zip.add_file("bar.txt", "/path/to/bar.txt")
+end

@@ -332,14 +332,13 @@ end

Example:

-

Zip.write("foo.zip") do |zip| -# add "bar.txt" -zip.add_file("bar.txt", "/path/to/bar.txt")

+
Zip.write("foo.zip") do |zip|
+  # add "bar.txt"
+  zip.add_file("bar.txt", "/path/to/bar.txt")
 
-
# print number of bytes written so far
-puts "bytes written so far: #{zip.bytes_written}"
- -

end

+ # print number of bytes written so far + puts "bytes written so far: #{zip.bytes_written}" +end

-- cgit v1.2.3