Class: Rack::Legacy::ErrorPage

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/legacy/error_page.rb

Instance Method Summary collapse

Constructor Details

#initialize(env, headers, stdout, stderr) ⇒ ErrorPage

Given the environment, stdout and stderr from a programs execution will generate a error page to assist in debugging



10
11
12
13
14
15
# File 'lib/rack/legacy/error_page.rb', line 10

def initialize(env, headers, stdout, stderr)
  @env = env
  @headers = headers
  @stdout = stdout
  @stderr = stderr
end

Instance Method Details

#to_sObject

Generate the page



18
19
20
# File 'lib/rack/legacy/error_page.rb', line 18

def to_s
  ERB.new(template).result binding
end