Module: Workspace::WorkspaceFile::Archive

Extended by:
ActiveSupport::Concern
Included in:
Workspace::WorkspaceFile
Defined in:
lib/workspace/workspace_file/archive.rb

Instance Method Summary collapse

Instance Method Details

#extract(target_dir) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/workspace/workspace_file/archive.rb', line 6

def extract(target_dir)
  target_dir.create
  if extension == "zip"
    extract_zip(target_dir)
  elsif extension == "gz"
    extract_gz(target_dir)
  end
  self
end