class ArchiveUploader::Archiver
Public Class Methods
new(options={})
click to toggle source
# File lib/archive_uploader/archiver.rb, line 3 def initialize(options={}) @files = options[:files] || [] @archive_file = options[:name] || Tempfile.new(["archive_uploader", ".tgz"]) end
Public Instance Methods
perform!()
click to toggle source
# File lib/archive_uploader/archiver.rb, line 8 def perform! `tar -czf #{@archive_file.path} #{@files.join(" ")}` @archive_file end