Class: Minizip::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/minizip/cli.rb

Instance Method Summary collapse

Instance Method Details

#dir(zip_name, dir_name) ⇒ Object



13
14
15
# File 'lib/minizip/cli.rb', line 13

def dir(zip_name, dir_name)
  Minizip::Zip.zip_dir(zip_name, dir_name)
end

#extract(zip_name, dir_name = nil) ⇒ Object



19
20
21
22
# File 'lib/minizip/cli.rb', line 19

def extract(zip_name, dir_name=nil)
  new_options = {'directory' => dir_name}.merge(options)
  Minizip::Zip.extract(zip_name, new_options)
end

#files(zip_name, *files_to_zip) ⇒ Object



8
9
10
# File 'lib/minizip/cli.rb', line 8

def files(zip_name, *files_to_zip)
  Minizip::Zip.zip_files(zip_name, files_to_zip.join(" "))
end