Class: SimpleGit::Object
- Inherits:
-
Object
- Object
- SimpleGit::Object
- Defined in:
- lib/simple_git/object.rb
Defined Under Namespace
Classes: ObjectWrapper
Instance Attribute Summary collapse
-
#ptr ⇒ Object
Returns the value of attribute ptr.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#ptr ⇒ Object
Returns the value of attribute ptr.
3 4 5 |
# File 'lib/simple_git/object.rb', line 3 def ptr @ptr end |
Class Method Details
.finalize(ptr) ⇒ Object
21 22 23 |
# File 'lib/simple_git/object.rb', line 21 def self.finalize(ptr) proc { Git2.git_object_free(ptr) } end |
Instance Method Details
#from_wrapper(wrapper) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/simple_git/object.rb', line 5 def from_wrapper(wrapper) @ptr = wrapper[:object] ObjectSpace.define_finalizer(self, self.class.finalize(@ptr)) self end |