Class: Grass::Render::Page
- Inherits:
-
Object
- Object
- Grass::Render::Page
show all
- Includes:
- Renderer
- Defined in:
- lib/grass/render/page.rb
Instance Method Summary
collapse
Methods included from Renderer
#initialize, #templates
#include_partial, #render_content, #render_partial
Instance Method Details
#render ⇒ Object
11
12
13
14
15
16
17
18
19
|
# File 'lib/grass/render/page.rb', line 11
def render
if @data[:view].nil? && !self.view.nil?
@data[:view] = @view
@data[:source] = @source
@view.render @data
else
super
end
end
|
#view ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/grass/render/page.rb', line 21
def view
@view ||= begin
keys = ["/views/#{@source.dir}/#{@source.path}","/views/#{@source.dir}/#{Grass::Render::View::DEFAULT_VIEW}"]
Source[keys].first
end
end
|