class Grit::GitRuby::Internal::RawObject
Attributes
content[RW]
type[RW]
Public Class Methods
new(type, content)
click to toggle source
# File lib/grit/git-ruby/internal/raw_object.rb, line 26 def initialize(type, content) @type = type @content = content end
Public Instance Methods
sha1()
click to toggle source
# File lib/grit/git-ruby/internal/raw_object.rb, line 31 def sha1 Digest::SHA1.digest("%s %d\0" % [@type, @content.length] + @content) end
to_hash()
click to toggle source
# File lib/grit/git-ruby/internal/raw_object.rb, line 35 def to_hash { :type => @type, :content => @content } end