gitlab-org--gitlab-foss/lib/gitlab/git/wiki_page_version.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
497 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
2017-10-03 16:58:33 +00:00
module Gitlab
module Git
class WikiPageVersion
include Gitlab::Utils::StrongMemoize
2017-10-03 16:58:33 +00:00
attr_reader :commit, :format
def initialize(commit, format)
@commit = commit
@format = format
end
delegate :message, :sha, :id, :author_name, :author_email, :authored_date, to: :commit
def author
strong_memoize(:author) do
::User.find_by_any_email(author_email)
end
end
2017-10-03 16:58:33 +00:00
end
end
end