Class: Rackful::HTTPStatus::Resource::XHTML
- Inherits:
-
Serializer::XHTML
- Object
- Serializer
- Serializer::XHTML
- Rackful::HTTPStatus::Resource::XHTML
- Defined in:
- lib/rackful/httpstatus.rb
Constant Summary
Instance Attribute Summary (collapse)
-
- (String) content_type
inherited
from Serializer
readonly
The content type to be served by this Serializer.
- - (Request) request inherited from Serializer readonly
- - (Resource) resource inherited from Serializer readonly
Instance Method Summary (collapse)
Constructor Details
This class inherits a constructor from Rackful::Serializer
Instance Attribute Details
- (String) content_type (readonly) Originally defined in class Serializer
Returns The content type to be served by this Serializer. This will always
be one of the content types listed in constant CONTENT_TYPES
.
- (Request) request (readonly) Originally defined in class Serializer
- (Resource) resource (readonly) Originally defined in class Serializer
Instance Method Details
- (void) header
20 21 22 23 24 25 26 27 |
# File 'lib/rackful/httpstatus.rb', line 20 def header retval = super retval += "<h1>HTTP/1.1 #{Rack::Utils.escape_html(resource.title)}</h1>\n" unless resource..empty? retval += "<div id=\"rackful-description\">#{resource.}</div>\n" end retval end |
- (void) headers
30 |
# File 'lib/rackful/httpstatus.rb', line 30 def headers; self.resource.headers; end |