Class: Protozoa::Views::Layout
- Inherits:
-
Mustache
- Object
- Mustache
- Protozoa::Views::Layout
show all
- Includes:
- Rack::Utils
- Defined in:
- lib/amiba/frontend/views/layout.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
9
10
11
|
# File 'lib/amiba/frontend/views/layout.rb', line 9
def name
@name
end
|
Instance Method Details
#edit_url ⇒ Object
27
28
29
30
31
32
33
|
# File 'lib/amiba/frontend/views/layout.rb', line 27
def edit_url
if @page.class == Amiba::Source::Entry
"/entries/edit#{@page.link}"
else
"/pages/edit#{@page.link}"
end
end
|
#escaped_name ⇒ Object
11
12
13
|
# File 'lib/amiba/frontend/views/layout.rb', line 11
def escaped_name
CGI.escape(@name)
end
|
#title ⇒ Object
15
16
17
|
# File 'lib/amiba/frontend/views/layout.rb', line 15
def title
"Home"
end
|
#view_url ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/amiba/frontend/views/layout.rb', line 19
def view_url
if @page.class == Amiba::Source::Entry
"/entries#{@page.link}"
else
"/pages#{@page.link}"
end
end
|