debian-mirror-gitlab/lib/gitlab/git/wiki_page_version.rb

25 lines
497 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
module Gitlab
module Git
class WikiPageVersion
2021-03-08 18:12:59 +05:30
include Gitlab::Utils::StrongMemoize
2018-03-17 18:26:18 +05:30
attr_reader :commit, :format
def initialize(commit, format)
@commit = commit
@format = format
end
2021-03-08 18:12:59 +05:30
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
2018-03-17 18:26:18 +05:30
end
end
end