gitlab-org--gitlab-foss/lib/gitlab/git/committer.rb
2017-08-23 10:45:20 +02:00

21 lines
429 B
Ruby

module Gitlab
module Git
class Committer
attr_reader :name, :email, :gl_id
def self.from_user(user)
new(user.name, user.email, Gitlab::GlId.gl_id(user))
end
def initialize(name, email, gl_id)
@name = name
@email = email
@gl_id = gl_id
end
def ==(other)
[name, email, gl_id] == [other.name, other.email, other.gl_id]
end
end
end
end