AP.Template = new Class(
{
    Implements: [Options],

    options: {},

    initialize: function(html, options)
    {
        this.html = html;
        this.setOptions(options);
    },

    toElement: function() {
        return this.render();
    },

    render: function(options)
    {
        return this.html.substitute(Object.merge({}, options, this.options));
    }
});
