Class: Rackful::HTTPStatus::Resource::XHTML

Inherits:
Serializer::XHTML show all
Defined in:
lib/rackful/httpstatus.rb

Constant Summary

Instance Attribute Summary (collapse)

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.

Returns:

  • (String)

    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

Returns:

- (Resource) resource (readonly) Originally defined in class Serializer

Returns:

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.message.empty?
    retval += "<div id=\"rackful-description\">#{resource.message}</div>\n"
  end
  retval
end

- (void) headers



30
# File 'lib/rackful/httpstatus.rb', line 30

def headers; self.resource.headers; end