Class: Grit::GitRuby::Blob
- Defined in:
- lib/grit/git-ruby/git_object.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
Attributes inherited from GitObject
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content, repository = nil) ⇒ Blob
constructor
A new instance of Blob.
- #raw_content ⇒ Object
- #type ⇒ Object
Methods inherited from GitObject
Constructor Details
#initialize(content, repository = nil) ⇒ Blob
Returns a new instance of Blob.
95 96 97 98 |
# File 'lib/grit/git-ruby/git_object.rb', line 95 def initialize(content, repository=nil) @content = content @repository = repository end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
89 90 91 |
# File 'lib/grit/git-ruby/git_object.rb', line 89 def content @content end |
Class Method Details
.from_raw(rawobject, repository) ⇒ Object
91 92 93 |
# File 'lib/grit/git-ruby/git_object.rb', line 91 def self.from_raw(rawobject, repository) new(rawobject.content) end |
Instance Method Details
#raw_content ⇒ Object
104 105 106 |
# File 'lib/grit/git-ruby/git_object.rb', line 104 def raw_content @content end |
#type ⇒ Object
100 101 102 |
# File 'lib/grit/git-ruby/git_object.rb', line 100 def type :blob end |