From: Dimitri Aivaliotis Date: 2006-04-07T15:37:37+09:00 Subject: Re: Archive::Tar uncompress question On 4/6/06, Daniel Berger wrote: > What makes more sense and/or which would you prefer? > > t = Tar::External.new > t.compressed_archive_name = 'somefile.tar.gz' > t.uncompress > > # or > > Tar::External.uncompress('somefile.tar.gz') > > The advantage to the latter is that it's simpler. The drawback is that it > wouldn't return an object. I prefer the latter. Would you really need an object returned if you're just uncompressing an archive? > Come to think of it, I should probably manually define compressed_archive_name= > like so in order to ensure other instance variables are set properly: > > How about this patch: > Thoughts? Looks good. I would still change the "unless" clause in the uncompress_archive method, in addition to this patch. Then both methods of uncompressing could be supported. > PS - Perhaps we should continue this over on the Shards project page under > "Open Discussion". See http://www.rubyforge.org/projects/shards. I'm happy with where this thread has ended up. If you feel more discussion is necessary, let me know, and I'll follow you over there. - Dimitri