提交 9fdcdb77 编写于 作者: D Dmitriy Zaporozhets

Move blob_snippet to gitlab_git gem

上级 b1aaf0d2
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册