Class: RakeDependencies::Extractors::UncompressedExtractor
- Inherits:
-
Object
- Object
- RakeDependencies::Extractors::UncompressedExtractor
- 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 = {}) ⇒ UncompressedExtractor
constructor
A new instance of UncompressedExtractor.
Constructor Details
#initialize(file_path, extract_path, options = {}) ⇒ UncompressedExtractor
Returns a new instance of UncompressedExtractor.
203 204 205 206 207 |
# File 'lib/rake_dependencies/extractors.rb', line 203 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.
201 202 203 |
# File 'lib/rake_dependencies/extractors.rb', line 201 def extract_path @extract_path end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
201 202 203 |
# File 'lib/rake_dependencies/extractors.rb', line 201 def file_path @file_path end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
201 202 203 |
# File 'lib/rake_dependencies/extractors.rb', line 201 def @options end |
Instance Method Details
#extract ⇒ Object
209 210 211 212 213 214 215 216 217 |
# File 'lib/rake_dependencies/extractors.rb', line 209 def extract target_name = rename_to || file_name source_path = file_path target_path = relative_to_extract_directory(target_name) create_extract_directory move(source_path, target_path) (target_path) end |