Class: RecursiveUnzipper

Inherits:
Object
  • Object
show all
Defined in:
lib/unzip_me/recursive_unzipper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(zip_path) ⇒ RecursiveUnzipper

Returns a new instance of RecursiveUnzipper.



4
5
6
7
# File 'lib/unzip_me/recursive_unzipper.rb', line 4

def initialize(zip_path)
  @zip_path = zip_path
  @exceptions = {}
end

Instance Attribute Details

#exceptionsObject (readonly)

Returns the value of attribute exceptions.



2
3
4
# File 'lib/unzip_me/recursive_unzipper.rb', line 2

def exceptions
  @exceptions
end

#zip_pathObject (readonly)

Returns the value of attribute zip_path.



2
3
4
# File 'lib/unzip_me/recursive_unzipper.rb', line 2

def zip_path
  @zip_path
end

Instance Method Details

#extract_to(extract_to_path) ⇒ Object



9
10
11
12
# File 'lib/unzip_me/recursive_unzipper.rb', line 9

def extract_to(extract_to_path)
  UnzipmeUnzipper.new(zip_path, { extract_to: extract_to_path }).unzip
  scan_and_unzip_dir(extract_to_path)
end