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
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(hash) ⇒ WikiPage
constructor
A new instance of WikiPage.
- #text_data ⇒ Object
Constructor Details
#initialize(hash) ⇒ WikiPage
Returns a new instance of WikiPage.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/gitlab/git/wiki_page.rb', line 8 def initialize(hash) @url_path = hash[:url_path] @title = hash[:title] @format = hash[:format] @path = hash[:path] @raw_data = hash[:raw_data] @name = hash[:name] @historical = hash[:historical] @version = hash[: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
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
19 20 21 |
# File 'lib/gitlab/git/wiki_page.rb', line 19 def historical? @historical end |
#text_data ⇒ Object
23 24 25 26 27 |
# File 'lib/gitlab/git/wiki_page.rb', line 23 def text_data return @text_data if defined?(@text_data) @text_data = @raw_data && Gitlab::EncodingHelper.encode!(@raw_data.dup) end |