# stdlib require 'rubygems' require 'erb' require 'fileutils' # ralbum require 'ralbum/options' require 'ralbum/skin' require 'ralbum/resource' class ErbSkinEngine < SkinEngine def initialize( skin ) super( skin ) end def render_album_page(albumNode) template_filename = File.join($RALBUM_HOME, "lib/ralbum/skins/#{skin.skin_name}/template/album_page.rhtml" ) template = ERB.new( File.read(template_filename) ) resource = Resource.new album = albumNode template.result(binding) end def render_image_page(image_pool_node) template_filename = File.join($RALBUM_HOME, "lib/ralbum/skins/#{skin.skin_name}/template/image_page.rhtml" ) template = ERB.new( File.read(template_filename) ) image = image_pool_node.image("default") template.result(binding) end end