Sha256: 8990af7463612cf836000b469a47902dfbfd72548efaa6ccee48cc04b24cdcb0

Contents?: true

Size: 847 Bytes

Versions: 1

Compression:

Stored size: 847 Bytes

Contents

# 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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gf-ralbum-0.0.5 lib/ralbum/skin_engines/erb_skin_engine.rb