Class: Darcs::Chunk::AddDirectory

Inherits:
Base
  • Object
show all
Defined in:
lib/darcs/patchwriter.rb

Overview

Chunk representing the addition of a directory to a repository

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ AddDirectory

Returns a new instance of AddDirectory.



53
54
55
# File 'lib/darcs/patchwriter.rb', line 53

def initialize(path)
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



57
58
59
# File 'lib/darcs/patchwriter.rb', line 57

def path
  @path
end

Instance Method Details

#write(io, patch) ⇒ Object



59
60
61
# File 'lib/darcs/patchwriter.rb', line 59

def write(io, patch)
  io.write("adddir #{path}\n")
end