Skip to content

Commit

Permalink
Fixed part "Read an archive"
Browse files Browse the repository at this point in the history
Tabs replaced with 2 spaces, so code is normally formated.
  • Loading branch information
grossws committed Mar 11, 2013
1 parent e450261 commit 3d16df6
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ Then you can use the beautiful rubyish API:

Assuming, you have "myarchive.tar.bz2" in the current directory.

a = Archive.new("myarchive.tar.bz2")
puts "This archive contains:"
a.each{|entry| puts entry}
#Archive includes the Enumerable module, making available all that
#nice enumerating functionality:
puts All entries in uppercase are:
puts a.map{|entry| entry.path.upcase}.join("\n")
#Furthermore, you can even read from the files contained in the
#archive without actually extracting it:
a.each{|entry, data| puts "Content of #{entry} is: #{data}"}
a = Archive.new("myarchive.tar.bz2")
puts "This archive contains:"
a.each{|entry| puts entry}
#Archive includes the Enumerable module, making available all that
#nice enumerating functionality:
puts All entries in uppercase are:
puts a.map{|entry| entry.path.upcase}.join("\n")
#Furthermore, you can even read from the files contained in the
#archive without actually extracting it:
a.each{|entry, data| puts "Content of #{entry} is: #{data}"}

=== Extract an archive

Expand Down

0 comments on commit 3d16df6

Please sign in to comment.