Class: RakeDependencies::Extractors::ZipExtractor
- Inherits:
-
Object
- Object
- RakeDependencies::Extractors::ZipExtractor
- Defined in:
- lib/rake_dependencies/extractors.rb
Instance Attribute Summary collapse
-
#extract_path ⇒ Object
readonly
Returns the value of attribute extract_path.
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #extract ⇒ Object
-
#initialize(file_path, extract_path, options = {}) ⇒ ZipExtractor
constructor
A new instance of ZipExtractor.
Constructor Details
#initialize(file_path, extract_path, options = {}) ⇒ ZipExtractor
Returns a new instance of ZipExtractor.
13 14 15 16 17 |
# File 'lib/rake_dependencies/extractors.rb', line 13 def initialize(file_path, extract_path, = {}) @file_path = file_path @extract_path = extract_path @options = end |
Instance Attribute Details
#extract_path ⇒ Object (readonly)
Returns the value of attribute extract_path.
11 12 13 |
# File 'lib/rake_dependencies/extractors.rb', line 11 def extract_path @extract_path end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
11 12 13 |
# File 'lib/rake_dependencies/extractors.rb', line 11 def file_path @file_path end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
11 12 13 |
# File 'lib/rake_dependencies/extractors.rb', line 11 def @options end |
Instance Method Details
#extract ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rake_dependencies/extractors.rb', line 19 def extract create_extract_directory extract_files return unless requires_rename? rename( relative_to_extract_directory(rename_from), relative_to_extract_directory(rename_to) ) end |