class Archive

Attributes

type[R]

Public Class Methods

new(type) click to toggle source
# File lib/archive.rb, line 24
def initialize type
  type = type.to_s
  puts_fail "Unsupported type" unless %w[lzo gzip].include? type.downcase
  instance_eval %{@type = #{type.upcase}}
end

Public Instance Methods

method_missing(name, *args) click to toggle source
# File lib/archive.rb, line 30
def method_missing name, *args
  StringIO.new @type.send(name, *args)
end