Class: Darcs::Chunk::AddFile
Overview
Chunk which adds record of a file to the repository. The file contents are not a part of this; those must be added separately with Chunk::Hunk or Chunk::Binary.
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path) ⇒ AddFile
constructor
A new instance of AddFile.
- #write(io, patch) ⇒ Object
Constructor Details
#initialize(path) ⇒ AddFile
Returns a new instance of AddFile.
68 69 70 |
# File 'lib/darcs/patchwriter.rb', line 68 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
72 73 74 |
# File 'lib/darcs/patchwriter.rb', line 72 def path @path end |
Instance Method Details
#write(io, patch) ⇒ Object
74 75 76 |
# File 'lib/darcs/patchwriter.rb', line 74 def write(io, patch) io.write("addfile #{path}\n") end |