gitlab-org--gitlab-foss/lib/gitlab/diff/line.rb
Dmitriy Zaporozhets 0d967bce57
Show additions/deletions stats on merge request diff
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-01 13:52:08 +02:00

20 lines
386 B
Ruby

module Gitlab
module Diff
class Line
attr_reader :type, :text, :index, :old_pos, :new_pos
def initialize(text, type, index, old_pos, new_pos)
@text, @type, @index = text, type, index
@old_pos, @new_pos = old_pos, new_pos
end
def added?
type == 'new'
end
def removed?
type == 'old'
end
end
end
end