Skip to content
Snippets Groups Projects
Commit 9fdcdb77 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Move blob_snippet to gitlab_git gem

parent b1aaf0d2
No related branches found
No related tags found
No related merge requests found
module Gitlab
class BlobSnippet
include Linguist::BlobHelper
attr_accessor :project
attr_accessor :tree
attr_accessor :lines
attr_accessor :filename
attr_accessor :startline
def initialize(project, tree, lines, startline, filename)
@project, @tree, @lines, @startline, @filename = project, tree, lines, startline, filename
end
def data
lines.join("\n")
end
def name
filename
end
def size
data.length
end
def mode
nil
end
end
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment