Class: ExcerptBlob
- Inherits:
-
Linguist::FileBlob
- Object
- Linguist::FileBlob
- ExcerptBlob
- Defined in:
- lib/git-branch_stats.rb
Overview
—– Language extractor from excerpts (that are in fact positive diffs) —– This is a simple override of linguist’s file blob, it is just ‘like’ the file it references, but its contents is only an exceprt of the changed lines
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(path, excerpt) ⇒ ExcerptBlob
constructor
A new instance of ExcerptBlob.
- #size ⇒ Object
Constructor Details
#initialize(path, excerpt) ⇒ ExcerptBlob
Returns a new instance of ExcerptBlob.
9 10 11 12 13 |
# File 'lib/git-branch_stats.rb', line 9 def initialize(path, excerpt) super(path) @data = excerpt @size = excerpt.bytesize end |
Instance Method Details
#data ⇒ Object
15 16 17 |
# File 'lib/git-branch_stats.rb', line 15 def data @data end |
#size ⇒ Object
19 20 21 |
# File 'lib/git-branch_stats.rb', line 19 def size @size end |