2017-10-03 12:58:33 -04:00
|
|
|
module Gitlab
|
|
|
|
module Git
|
|
|
|
class WikiFile
|
2017-10-23 17:05:59 -04:00
|
|
|
attr_reader :mime_type, :raw_data, :name, :path
|
2017-10-03 12:58:33 -04:00
|
|
|
|
|
|
|
# This class is meant to be serializable so that it can be constructed
|
|
|
|
# by Gitaly and sent over the network to GitLab.
|
|
|
|
#
|
|
|
|
# Because Gollum::File is not serializable we must get all the data from
|
|
|
|
# 'gollum_file' during initialization, and NOT store it in an instance
|
|
|
|
# variable.
|
|
|
|
def initialize(gollum_file)
|
|
|
|
@mime_type = gollum_file.mime_type
|
|
|
|
@raw_data = gollum_file.raw_data
|
|
|
|
@name = gollum_file.name
|
2017-10-23 17:05:59 -04:00
|
|
|
@path = gollum_file.path
|
2017-10-03 12:58:33 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|