Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanmac committed Apr 18, 2013
2 parents 9375c78 + 3917eb7 commit 0e051ae
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 0e051ae

Please sign in to comment.