Class Grit::GitRuby::Internal::RawObject
In: lib/grit/git-ruby/internal/raw_object.rb
Parent: Object

Methods

new   sha1  

Attributes

content  [RW] 
type  [RW] 

Public Class methods

[Source]

    # File lib/grit/git-ruby/internal/raw_object.rb, line 26
26:         def initialize(type, content)
27:           @type = type
28:           @content = content
29:         end

Public Instance methods

[Source]

    # File lib/grit/git-ruby/internal/raw_object.rb, line 31
31:         def sha1
32:           Digest::SHA1.digest("%s %d\0" % [@type, @content.length] + @content)
33:         end

[Validate]