Borges::DocumentHandler (Class)

In: lib/Borges/RequestHandler/DocumentHandler.rb
Parent: Object

DocumentHandler handles requests for static documents. DocumentHandlers never expire, but only one DocumentHandler for a particular piece of content and MIME type can be registered, saving space.


active?   eql?   handle_request   hash   new  


document  [R]  The document held by this DocumentHandler.
response  [RW]  The HTTP response held by this DocumentHandler.

Public Class methods

Creates a new DocumentHandler with the MIME type mime_type that contains obj as its contents.

Public Instance methods

A DocumentHandler is always active, so DocumentHandlers can never expire.

A DocumentHandlers is eql? to another object when:

  • The other object is a DocumentHandler
  • The other object has the same document
  • The other object has the same MIME type

Returns the response held by the DocumentHandler.

A DocumentHandler’s hash is the document’s hash ORed with the MIME type’s hash.