diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-08-10 21:16:44 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-08-10 21:16:44 -0400 |
commit | 055abed0e28681387377671bc16d40d075e3aaf7 (patch) | |
tree | fb038fde87156a164ba7ce64f80dffa0494286f7 /Zip/Archive.html | |
parent | 25199ab4c29057d7c0a73812fc8f2ac3605c1d86 (diff) | |
download | zip-crystal-055abed0e28681387377671bc16d40d075e3aaf7.tar.bz2 zip-crystal-055abed0e28681387377671bc16d40d075e3aaf7.zip |
update documentation
Diffstat (limited to 'Zip/Archive.html')
-rw-r--r-- | Zip/Archive.html | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Zip/Archive.html b/Zip/Archive.html index ea6e914..332b0f1 100644 --- a/Zip/Archive.html +++ b/Zip/Archive.html @@ -298,9 +298,9 @@ <p>Example:</p> -<p># get bar.txt and read it into memory io -io = MemoryIO.new -zip["bar.txt"].read(io)</p></div> +<pre><code><span class="c"># get bar.txt and read it into memory io</span> +io <span class="o">=</span> <span class="t">MemoryIO</span>.<span class="k">new</span> +zip[<span class="s">"bar.txt"</span>].read(io)</code></pre></div> <br/> <div> @@ -320,9 +320,9 @@ zip["bar.txt"].read(io)</p></div> <p>Example:</p> -<p># read third entry from archive into memory io -io = MemoryIO.new -zip[2].read(io)</p></div> +<pre><code><span class="c"># read third entry from archive into memory io</span> +io <span class="o">=</span> <span class="t">MemoryIO</span>.<span class="k">new</span> +zip[<span class="n">2</span>].read(io)</code></pre></div> <br/> <div> @@ -342,11 +342,11 @@ zip[2].read(io)</p></div> <p>Example:</p> -<p># read third entry from archive into memory io -if e = zip[2] -io = MemoryIO.new -e.read(io) -end</p></div> +<pre><code><span class="c"># read third entry from archive into memory io</span> +<span class="k">if</span> e <span class="o">=</span> zip[<span class="n">2</span>]? + io <span class="o">=</span> <span class="t">MemoryIO</span>.<span class="k">new</span> + e.read(io) +<span class="k">end</span></code></pre></div> <br/> <div> @@ -366,11 +366,11 @@ end</p></div> <p>Example:</p> -<p># read bar.txt into memory io if it exists -if e = zip["bar.txt"]? -io = MemoryIO.new -e.read(io) -end</p></div> +<pre><code><span class="c"># read bar.txt into memory io if it exists</span> +<span class="k">if</span> e <span class="o">=</span> zip[<span class="s">"bar.txt"</span>]? + io <span class="o">=</span> <span class="t">MemoryIO</span>.<span class="k">new</span> + e.read(io) +<span class="k">end</span></code></pre></div> <br/> <div> |