Class: PEBuild::Unpack::Copy
- Inherits:
-
Object
- Object
- PEBuild::Unpack::Copy
- Defined in:
- lib/pe_build/unpack/copy.rb
Instance Method Summary collapse
-
#creates ⇒ String
The file/dir that will be created as a result of unpack.
-
#initialize(src, dst) ⇒ Copy
constructor
A new instance of Copy.
- #unpack ⇒ Object
Constructor Details
#initialize(src, dst) ⇒ Copy
Returns a new instance of Copy.
8 9 10 |
# File 'lib/pe_build/unpack/copy.rb', line 8 def initialize(src, dst) @src, @dst = src, dst end |
Instance Method Details
#creates ⇒ String
Returns The file/dir that will be created as a result of unpack.
17 18 19 20 |
# File 'lib/pe_build/unpack/copy.rb', line 17 def creates basename = File.basename(@src) deploy_path = File.join(@dst, basename) end |
#unpack ⇒ Object
12 13 14 |
# File 'lib/pe_build/unpack/copy.rb', line 12 def unpack FileUtils.cp(@src, creates) end |