class Html def initialize(param) @title, @body = [param[:title], param[:body]] end def title(str); "<title>#{str}</title>"; end def body(tit, str); "<h1>#{tit}</h1>\n<p>#{str}</p>"; end def html return <<EOF <html> <head>#{title(@title)}</head> <body>#{body(@title, @body)}</body> </html> EOF end end