2017-10-19 10:18:26 -04:00
|
|
|
module Gitlab
|
|
|
|
module GitalyClient
|
|
|
|
class WikiPage
|
2017-11-13 05:05:16 -05:00
|
|
|
ATTRS = %i(title format url_path path name historical raw_data).freeze
|
2017-10-19 10:18:26 -04:00
|
|
|
|
2017-11-13 05:05:16 -05:00
|
|
|
include AttributesBag
|
2017-10-19 10:18:26 -04:00
|
|
|
|
|
|
|
def initialize(params)
|
2017-11-13 05:05:16 -05:00
|
|
|
super
|
2017-11-09 18:27:00 -05:00
|
|
|
|
|
|
|
# All gRPC strings in a response are frozen, so we get an unfrozen
|
|
|
|
# version here so appending to `raw_data` doesn't blow up.
|
|
|
|
@raw_data = @raw_data.dup
|
2017-10-19 10:18:26 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def historical?
|
|
|
|
@historical
|
|
|
|
end
|
|
|
|
|
|
|
|
def format
|
|
|
|
@format.to_sym
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|