devdaily home | apple | java | perl | unix | directory | blog

What this is

This file is included in the DevDaily.com "Ruby Source Code Warehouse" project. The intent of this project is to help you "Learn Ruby by Example" TM.

Other links

The source code

# Copyritght (c) 2002 TANIGUCHI Takaki
# This program is distributed under the GNU GPL 2 or later.

require 'amrita/template'
require 'aswiki/pagedata'

module AsWiki
  class Page
    def initialize(pagetype, data)
      PageData::load_parts_template(pagetype)
      tmplfile = File.join($DIR_TEMPLATE, 'PageBase.html')
      template = Amrita::TemplateFileWithCache[tmplfile]
      template.expand_attr = true
      template.pre_format = true
      template.use_compiler = true

      @str = ''
      # template.set_hint_by_sample_data(data)
      template.expand(@str, data)
    end
    
    def to_s
      return @str
    end
  end
end




Copyright 1998-2008 Alvin Alexander
All Rights Reserved.
 
devdaily.com is based in louisville, kentucky, and this web site is hosted by godaddy.com