Parent

Heel::ErrorResponse

Attributes

base_uri[R]

Public Class Methods

homepage() click to toggle source
# File lib/heel/error_response.rb, line 25
def homepage
  @homepage ||= Heel::Configuration::HOMEPAGE
end
new(base_uri, body, status = 404, header = {}) click to toggle source
# File lib/heel/error_response.rb, line 30
def initialize(base_uri, body, status = 404, header = {})
  super(body, status, header)
  self['Content-type'] = 'text/html'
  @base_uri = base_uri
end
template() click to toggle source
# File lib/heel/error_response.rb, line 21
def template
  @template ||= ::ERB.new(File.read(template_file))
end
template_file() click to toggle source
# File lib/heel/error_response.rb, line 17
def template_file
  @template_file ||= Heel::Configuration.data_path("error.rhtml")
end

Public Instance Methods

finish() click to toggle source
# File lib/heel/error_response.rb, line 36
def finish
  message  = ::Rack::Utils::HTTP_STATUS_CODES[status]
  homepage = ErrorResponse.homepage

  return [ status, header.to_hash, ErrorResponse.template.result(binding) ]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.