Module: PEBuild::Transfer::File Private
- Extended by:
- Idempotent
- Defined in:
- lib/pe_build/transfer/file.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
TODO:
These methods fail in a messy way if something goes wrong. They should be refactored to raise proper errors.
Class Method Summary collapse
- .copy(src, dst) ⇒ Object private
-
.read(src) ⇒ String
private
The contents of the file with leading and trailing whitespace removed.
Methods included from Idempotent
Class Method Details
.copy(src, dst) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/pe_build/transfer/file.rb', line 12 def self.copy(src, dst) idempotent(dst) { FileUtils.cp src.path, dst } end |
.read(src) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The contents of the file with leading and trailing whitespace removed.
21 22 23 |
# File 'lib/pe_build/transfer/file.rb', line 21 def self.read(src) File.read(src.path).strip end |