Class: Gitlab::HookData::WikiPageBuilder
Constant Summary
Constants inherited
from BaseBuilder
BaseBuilder::MARKDOWN_SIMPLE_IMAGE
Instance Attribute Summary
Attributes inherited from BaseBuilder
#object
Instance Method Summary
collapse
Methods inherited from BaseBuilder
#initialize
Instance Method Details
#build ⇒ Object
8
9
10
11
12
13
14
15
|
# File 'lib/gitlab/hook_data/wiki_page_builder.rb', line 8
def build
wiki_page
.attributes
.except(:content)
.merge(
version_id: wiki_page.version&.id
)
end
|
#page_content ⇒ Object
17
18
19
|
# File 'lib/gitlab/hook_data/wiki_page_builder.rb', line 17
def page_content
absolute_image_urls(wiki_page.content)
end
|
#uploads_prefix ⇒ Object
21
22
23
|
# File 'lib/gitlab/hook_data/wiki_page_builder.rb', line 21
def uploads_prefix
wiki_page.wiki.wiki_base_path
end
|