class SimpleGit::Oid

Attributes

ptr[RW]

Public Class Methods

new() click to toggle source
# File lib/simple_git/oid.rb, line 5
def initialize
  @ptr = Git2::GitOid.new
end

Public Instance Methods

[](*args) click to toggle source
# File lib/simple_git/oid.rb, line 15
def [](*args)
  to_s.[](*args)
end
to_s() click to toggle source
# File lib/simple_git/oid.rb, line 9
def to_s
  string = FFI::MemoryPointer.new(:char, 41)
  Git2.git_oid_tostr(string, 41, @ptr)
  string.read_string
end