def render
      raise "unable to find template file: #{template}" unless File.exists?(template)

      extension = File.extname(template)
      extension = extension.downcase if extension

      case extension
        when '.erb'
          contents = File.open(template, "r") {|f| f.read}
          ERB.new(contents, nil, '-').result(self.get_binding)
        when '.slim'
          Slim::Template.new(template, {:pretty => true}).render(self)
        else
          raise "unsupported template type based on file extension #{extension}"
      end
    end
def render
      raise "unable to find template file: #{template}" unless File.exists?(template)

      extension = File.extname(template)
      extension = extension.downcase if extension

      case extension
        when '.erb'
          contents = File.open(template, "r") {|f| f.read}
          ERB.new(contents, nil, '-').result(self.get_binding)
        when '.slim'
          Slim::Template.new(template, {:pretty => true}).render(self)
        else
          raise "unsupported template type based on file extension #{extension}"
      end
    end
TODO: render based on file ext