Class: Rackful::HTTPStatus::Resource

Inherits:
Resource
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/rackful/httpstatus.rb

Defined Under Namespace

Classes: XHTML

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Resource) initialize(uri, http_status_object)

Returns a new instance of Resource



42
43
44
45
# File 'lib/rackful/httpstatus.rb', line 42

def initialize(uri, http_status_object)
  super(uri)
  @http_status_object = http_status_object
end

Instance Attribute Details

- (String) get_etag (readonly) Originally defined in class Resource

This method is abstract.

The ETag of this resource.

If your classes implement this method, then an ETag: response header is generated automatically when appropriate. This allows clients to perform conditional requests, by sending an If-Match: or If-None-Match: request header. These conditions are then asserted for you automatically.

Make sure your entity tag is a properly formatted string. In ABNF:

entity-tag    = [ "W/" ] quoted-string
quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
qdtext        = <any TEXT except <">>
quoted-pair   = "\" CHAR

Returns:

  • (String)

See Also:

- (Array<(Time, Boolean)>) get_last_modified (readonly) Originally defined in class Resource

This method is abstract.

Last modification of this resource.

If your classes implement this method, then a Last-Modified: response header is generated automatically when appropriate. This allows clients to perform conditional requests, by sending an If-Modified-Since: or If-Unmodified-Since: request header. These conditions are then asserted for you automatically.

Returns:

  • (Array<(Time, Boolean)>)

    The timestamp, and a flag indicating if the timestamp is a strong validator.

See Also:

- (URI) uri (readonly) Originally defined in class Resource

The canonical path of this resource.

Returns: