Class: Yuzu::Renderers::GalleryRenderer
Instance Method Summary
collapse
Methods inherited from Renderer
#initialize, registry, renderers
Instance Method Details
#gallery_template ⇒ Object
10
11
12
|
# File 'lib/yuzu/renderers/gallery.rb', line 10
def gallery_template
@template ||= Yuzu::Core::HamlTemplate.new(template_name)
end
|
#render(website_file) ⇒ Object
14
15
16
17
18
19
20
|
# File 'lib/yuzu/renderers/gallery.rb', line 14
def render(website_file)
if gallery_template.exists?
gallery_template.render(website_file, {:images => website_file.images})
else
Html::Comment.new << "Couldn't find gallery template #{gallery_template.path.absolute}"
end
end
|
#template_name ⇒ Object
6
7
8
|
# File 'lib/yuzu/renderers/gallery.rb', line 6
def template_name
"_gallery.haml"
end
|