Class: SimpleGit::Tree
- Inherits:
-
Object
- Object
- SimpleGit::Tree
- Defined in:
- lib/simple_git/tree.rb
Defined Under Namespace
Classes: TreeWrapper
Instance Attribute Summary collapse
-
#ptr ⇒ Object
Returns the value of attribute ptr.
Instance Method Summary collapse
Instance Attribute Details
#ptr ⇒ Object
Returns the value of attribute ptr.
3 4 5 |
# File 'lib/simple_git/tree.rb', line 3 def ptr @ptr end |
Instance Method Details
#from_commit(commit) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/simple_git/tree.rb', line 5 def from_commit(commit) wrapper = TreeWrapper.new Git2.git_commit_tree(wrapper, commit.ptr) @ptr = wrapper[:tree] ObjectSpace.define_finalizer(self, self.class.finalize(@ptr)) self end |