Class: Protozoa::Views::Page
- Inherits:
-
Layout
- Object
- Mustache
- Layout
- Protozoa::Views::Page
show all
- Defined in:
- lib/amiba/frontend/views/page.rb
Instance Attribute Summary collapse
Attributes inherited from Layout
#name
Instance Method Summary
collapse
Methods inherited from Layout
#edit_url, #escaped_name, #view_url
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
4
5
6
|
# File 'lib/amiba/frontend/views/page.rb', line 4
def content
@content
end
|
Returns the value of attribute footer.
4
5
6
|
# File 'lib/amiba/frontend/views/page.rb', line 4
def
@footer
end
|
#page ⇒ Object
Returns the value of attribute page.
4
5
6
|
# File 'lib/amiba/frontend/views/page.rb', line 4
def page
@page
end
|
Instance Method Details
#author ⇒ Object
14
15
16
|
# File 'lib/amiba/frontend/views/page.rb', line 14
def author
@page.new? ? "No Author" : @page.author
end
|
#date ⇒ Object
18
19
20
|
# File 'lib/amiba/frontend/views/page.rb', line 18
def date
@page.new? ? DateTime.now.strftime("%Y-%m-%d %H:%M:%S") : @page.pubdate.strftime("%Y-%m-%d %H:%M:%S")
end
|
#editable ⇒ Object
22
23
24
|
# File 'lib/amiba/frontend/views/page.rb', line 22
def editable
@editable
end
|
10
11
12
|
# File 'lib/amiba/frontend/views/page.rb', line 10
def format
@page.format.to_s
end
|
#title ⇒ Object
6
7
8
|
# File 'lib/amiba/frontend/views/page.rb', line 6
def title
@page.title
end
|