Class: Protozoa::Views::Page

Inherits:
Layout
  • Object
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

#contentObject (readonly)

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
  @footer
end

#pageObject (readonly)

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

#authorObject



14
15
16
# File 'lib/amiba/frontend/views/page.rb', line 14

def author
  @page.new? ? "No Author" : @page.author
end

#dateObject



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

#editableObject



22
23
24
# File 'lib/amiba/frontend/views/page.rb', line 22

def editable
  @editable
end

#formatObject



10
11
12
# File 'lib/amiba/frontend/views/page.rb', line 10

def format
  @page.format.to_s
end

#titleObject



6
7
8
# File 'lib/amiba/frontend/views/page.rb', line 6

def title
  @page.title
end