Class: Precious::Views::Page
- Defined in:
- lib/gollum/frontend/views/page.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#footer ⇒ Object
readonly
Returns the value of attribute footer.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
Attributes inherited from Layout
Instance Method Summary collapse
- #author ⇒ Object
- #date ⇒ Object
- #editable ⇒ Object
- #footer_content ⇒ Object
- #footer_format ⇒ Object
- #format ⇒ Object
- #has_footer ⇒ Object
- #has_sidebar ⇒ Object
- #sidebar_content ⇒ Object
- #sidebar_format ⇒ Object
- #title ⇒ Object
Methods inherited from Layout
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/gollum/frontend/views/page.rb', line 4 def content @content end |
#footer ⇒ Object (readonly)
Returns the value of attribute footer.
4 5 6 |
# File 'lib/gollum/frontend/views/page.rb', line 4 def @footer end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
4 5 6 |
# File 'lib/gollum/frontend/views/page.rb', line 4 def page @page end |
Instance Method Details
#author ⇒ Object
14 15 16 |
# File 'lib/gollum/frontend/views/page.rb', line 14 def @page.version..name end |
#date ⇒ Object
18 19 20 |
# File 'lib/gollum/frontend/views/page.rb', line 18 def date @page.version..strftime("%Y-%m-%d %H:%M:%S") end |
#editable ⇒ Object
22 23 24 |
# File 'lib/gollum/frontend/views/page.rb', line 22 def editable @editable end |
#footer_content ⇒ Object
31 32 33 |
# File 'lib/gollum/frontend/views/page.rb', line 31 def && @footer.formatted_data end |
#footer_format ⇒ Object
35 36 37 |
# File 'lib/gollum/frontend/views/page.rb', line 35 def && @footer.format.to_s end |
#format ⇒ Object
10 11 12 |
# File 'lib/gollum/frontend/views/page.rb', line 10 def format @page.format.to_s end |
#has_footer ⇒ Object
26 27 28 29 |
# File 'lib/gollum/frontend/views/page.rb', line 26 def @footer = (@page. || false) if @footer.nil? !!@footer end |
#has_sidebar ⇒ Object
39 40 41 42 |
# File 'lib/gollum/frontend/views/page.rb', line 39 def @sidebar = (@page. || false) if @sidebar.nil? !!@sidebar end |
#sidebar_content ⇒ Object
44 45 46 |
# File 'lib/gollum/frontend/views/page.rb', line 44 def && @sidebar.formatted_data end |
#sidebar_format ⇒ Object
48 49 50 |
# File 'lib/gollum/frontend/views/page.rb', line 48 def && @sidebar.format.to_s end |
#title ⇒ Object
6 7 8 |
# File 'lib/gollum/frontend/views/page.rb', line 6 def title @page.title end |