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.
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 |
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 |
#to_s ⇒ Object
13 14 15 16 17 |
# File 'lib/simple_git/object.rb', line 13 def to_s oid = Oid.allocate oid.ptr = Git2::GitOid.new(Git2.git_object_id(@ptr)) oid.to_s end |