Commit 9fdcdb774ff496f4f1c8bf61290d1d70cbd5c3ed
1 parent
b1aaf0d2
Exists in
master
and in
4 other branches
Move blob_snippet to gitlab_git gem
Showing
1 changed file
with
0 additions
and
32 deletions
Show diff stats
lib/gitlab/blob_snippet.rb
| ... | ... | @@ -1,32 +0,0 @@ |
| 1 | -module Gitlab | |
| 2 | - class BlobSnippet | |
| 3 | - include Linguist::BlobHelper | |
| 4 | - | |
| 5 | - attr_accessor :project | |
| 6 | - attr_accessor :tree | |
| 7 | - attr_accessor :lines | |
| 8 | - attr_accessor :filename | |
| 9 | - attr_accessor :startline | |
| 10 | - | |
| 11 | - def initialize(project, tree, lines, startline, filename) | |
| 12 | - @project, @tree, @lines, @startline, @filename = project, tree, lines, startline, filename | |
| 13 | - end | |
| 14 | - | |
| 15 | - def data | |
| 16 | - lines.join("\n") | |
| 17 | - end | |
| 18 | - | |
| 19 | - def name | |
| 20 | - filename | |
| 21 | - end | |
| 22 | - | |
| 23 | - def size | |
| 24 | - data.length | |
| 25 | - end | |
| 26 | - | |
| 27 | - def mode | |
| 28 | - nil | |
| 29 | - end | |
| 30 | - | |
| 31 | - end | |
| 32 | -end | |
| 33 | 0 | \ No newline at end of file |