Class: Rayo::Models::StatusPage
- Inherits:
-
Page
- Object
- Page
- Rayo::Models::StatusPage
show all
- Defined in:
- lib/rayo/models/status_page.rb
Instance Attribute Summary
Attributes inherited from Page
#lang, #parent, #path, #storage
Instance Method Summary
collapse
Methods inherited from Page
#[], #child, #children, #descendant, #find_part, #layout, #parser, #parts, #relative, #render
Constructor Details
#initialize(storage, root, path, status) ⇒ StatusPage
Returns a new instance of StatusPage.
5
6
7
8
9
|
# File 'lib/rayo/models/status_page.rb', line 5
def initialize( storage, root, path, status )
super( storage, root, root.lang, path )
@status = status
end
|
Instance Method Details
#context ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/rayo/models/status_page.rb', line 19
def context
return @context if @context
@context = @parent ? @parent.context.merge({ 'status' => @status }) : { 'status' => @status }
@context.merge! load_context( file ) if file
@context
end
|
#directories ⇒ Object
11
12
13
|
# File 'lib/rayo/models/status_page.rb', line 11
def directories
[]
end
|
#file ⇒ Object
15
16
17
|
# File 'lib/rayo/models/status_page.rb', line 15
def file
@file ||= @storage.find_page_file( @parent.directories, @lang, @status.to_s )
end
|
#params ⇒ Object
27
28
29
|
# File 'lib/rayo/models/status_page.rb', line 27
def params
{ 'path' => path }
end
|