Module: Archive::Ar

Defined in:
lib/archive/ar.rb,
lib/archive/ar/format.rb,
lib/archive/ar/reader.rb,
lib/archive/ar/writer.rb,
lib/archive/ar/version.rb

Defined Under Namespace

Classes: Format, Reader, Writer

Constant Summary collapse

MAGIC =
"!<arch>\n"
VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.create(dest_file, filenames = [], options = {}) ⇒ Object



10
11
12
# File 'lib/archive/ar.rb', line 10

def self.create(dest_file, filenames = [], options = {})
  Writer.new(filenames).write(dest_file, options)
end

.extract(source_file, dest_dir, options = {}) ⇒ Object



14
15
16
# File 'lib/archive/ar.rb', line 14

def self.extract(source_file, dest_dir, options = {})
  Reader.new(source_file, options).extract(dest_dir, options)
end

.traverse(source_file, options = {}, &block) ⇒ Object



18
19
20
# File 'lib/archive/ar.rb', line 18

def self.traverse(source_file, options = {}, &block)
  Reader.new(source_file, options).each(&block)
end