Commit 9fdcdb77 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Move blob_snippet to gitlab_git gem

parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment