# Build the template, setting the attributes and filename if specified.
# All methods of self will be accessible in the template.
def build(attrs=nil, filename=nil)
attrs.each_pair do |key, value|
send("#{key}=", value)
end if attrs
@template.filename = filename
@template.result(binding)
@_erbout
end