Class: Ape::HTML

Inherits:
Object
  • Object
show all
Defined in:
lib/ape/html.rb

Class Method Summary collapse

Class Method Details

.error(message, output = STDOUT) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/ape/html.rb', line 6

def HTML.error(message, output=STDOUT)
  headers(output)
  output.puts <<EndOfText
  <title>Error: #{message}</title>
  </head>
  <body>
  <h2>Error</h2>
  <p>#{message}.</p>
EndOfText
end