class
Agate::TreeBuilder
- Agate::TreeBuilder
- Reference
- Object
Overview
Builds a new tree object entry by entry.
Defined in:
agate/tree.crConstructors
-
.new(repo : Repository, source : Tree | Nil = nil) : TreeBuilder
Creates a new tree builder, optionally based on an existing tree.
Instance Method Summary
-
#<<(tuple : Tuple(String, OID, FileMode)) : Nil
Alias for insert.
-
#clear : Nil
Clears all entries.
-
#count : Int32
Returns the number of entries in the builder.
-
#insert(name : String, oid : OID, filemode : FileMode = FileMode::Blob) : Nil
Inserts or updates an entry.
-
#remove(name : String) : Nil
Removes an entry by name.
-
#write : OID
Writes the tree to the repository and returns its OID.
Constructor Detail
Creates a new tree builder, optionally based on an existing tree.
Instance Method Detail
Inserts or updates an entry.