Class: Gitlab::Git::WikiPage
- Inherits:
-
Object
- Object
- Gitlab::Git::WikiPage
- Defined in:
- lib/gitlab/git/wiki_page.rb
Instance Attribute Summary collapse
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#formatted_data ⇒ Object
readonly
Returns the value of attribute formatted_data.
-
#historical ⇒ Object
readonly
Returns the value of attribute historical.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#raw_data ⇒ Object
readonly
Returns the value of attribute raw_data.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url_path ⇒ Object
readonly
Returns the value of attribute url_path.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #historical? ⇒ Boolean
-
#initialize(gitaly_page, version) ⇒ WikiPage
constructor
This class abstracts away Gitlab::GitalyClient::WikiPage.
- #text_data ⇒ Object
Constructor Details
#initialize(gitaly_page, version) ⇒ WikiPage
This class abstracts away Gitlab::GitalyClient::WikiPage
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/gitlab/git/wiki_page.rb', line 9 def initialize(gitaly_page, version) @url_path = gitaly_page.url_path @title = gitaly_page.title @format = gitaly_page.format @path = gitaly_page.path @raw_data = gitaly_page.raw_data @name = gitaly_page.name @historical = gitaly_page.historical? @version = version end |
Instance Attribute Details
#format ⇒ Object (readonly)
Returns the value of attribute format
6 7 8 |
# File 'lib/gitlab/git/wiki_page.rb', line 6 def format @format end |
#formatted_data ⇒ Object (readonly)
Returns the value of attribute formatted_data
6 7 8 |
# File 'lib/gitlab/git/wiki_page.rb', line 6 def formatted_data @formatted_data end |
#historical ⇒ Object (readonly)
Returns the value of attribute historical
6 7 8 |
# File 'lib/gitlab/git/wiki_page.rb', line 6 def historical @historical end |
#name ⇒ Object (readonly)
Returns the value of attribute name
6 7 8 |
# File 'lib/gitlab/git/wiki_page.rb', line 6 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path
6 7 8 |
# File 'lib/gitlab/git/wiki_page.rb', line 6 def path @path end |
#raw_data ⇒ Object (readonly)
Returns the value of attribute raw_data
6 7 8 |
# File 'lib/gitlab/git/wiki_page.rb', line 6 def raw_data @raw_data end |
#title ⇒ Object (readonly)
Returns the value of attribute title
6 7 8 |
# File 'lib/gitlab/git/wiki_page.rb', line 6 def title @title end |
#url_path ⇒ Object (readonly)
Returns the value of attribute url_path
6 7 8 |
# File 'lib/gitlab/git/wiki_page.rb', line 6 def url_path @url_path end |
#version ⇒ Object (readonly)
Returns the value of attribute version
6 7 8 |
# File 'lib/gitlab/git/wiki_page.rb', line 6 def version @version end |
Instance Method Details
#historical? ⇒ Boolean
21 22 23 |
# File 'lib/gitlab/git/wiki_page.rb', line 21 def historical? @historical end |
#text_data ⇒ Object
25 26 27 28 29 |
# File 'lib/gitlab/git/wiki_page.rb', line 25 def text_data return @text_data if defined?(@text_data) @text_data = @raw_data && Gitlab::EncodingHelper.encode!(@raw_data.dup) end |