Class: Rackful::HTTPStatus::XHTML

Inherits:
XHTML show all
Defined in:
gems/rackful-0.1.1/lib/rackful_http_status.rb,
gems/rackful-0.1.1.orig/lib/rackful_http_status.rb

Overview

Since:

Constant Summary

HTTP_STATUS_CODES =

Since:

  • 0.1.0

Rack::Utils::HTTP_STATUS_CODES

Constants inherited from XHTML

XHTML::CONTENT_TYPES

Instance Attribute Summary

Attributes inherited from Serializer

#content_type, #resource

Instance Method Summary (collapse)

Methods inherited from XHTML

#each, #each_nested, #footer, #htmlify, #xsd_type

Methods inherited from Serializer

#each, #initialize

Constructor Details

This class inherits a constructor from Rackful::Serializer

Instance Method Details

- (void) header

Since:

  • 0.1.0



64
65
66
67
68
69
70
71
# File 'gems/rackful-0.1.1/lib/rackful_http_status.rb', line 64

def header
  <<EOS
<title>#{self.resource.status} #{HTTP_STATUS_CODES[self.resource.status]}</title>
</head><body>
<h1>HTTP/1.1 #{self.resource.status} #{HTTP_STATUS_CODES[self.resource.status]}</h1>
<div id="rackful_description">#{self.resource.message}</div>
EOS
end

- (void) headers

Since:

  • 0.1.0



74
75
76
# File 'gems/rackful-0.1.1/lib/rackful_http_status.rb', line 74

def headers
  self.resource.headers
end