gitlab-org--gitlab-foss/lib/gitlab/gitaly_client/wiki_page.rb
Ahmad Sherif 964cbb67da Migrate Gitlab::Git::Wiki#page to Gitaly
Closes gitaly#677
2017-10-31 18:28:54 +02:00

25 lines
477 B
Ruby

module Gitlab
module GitalyClient
class WikiPage
FIELDS = %i(title format url_path path name historical raw_data).freeze
attr_accessor(*FIELDS)
def initialize(params)
params = params.with_indifferent_access
FIELDS.each do |field|
instance_variable_set("@#{field}", params[field])
end
end
def historical?
@historical
end
def format
@format.to_sym
end
end
end
end