Class: Rackful::HTTPStatus::Resource
- Inherits:
-
Resource
- Object
- Resource
- Rackful::HTTPStatus::Resource
- Extended by:
- Forwardable
- Defined in:
- lib/rackful/httpstatus.rb
Defined Under Namespace
Classes: XHTML
Instance Attribute Summary (collapse)
-
- (String) get_etag
inherited
from Resource
readonly
abstract
The ETag of this resource.
-
- (Array<(Time, Boolean)>) get_last_modified
inherited
from Resource
readonly
abstract
Last modification of this resource.
-
- (URI) uri
inherited
from Resource
readonly
The canonical path of this resource.
Instance Method Summary (collapse)
-
- (Resource) initialize(uri, http_status_object)
constructor
A new instance of Resource.
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
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
- (Array<(Time, Boolean)>) get_last_modified (readonly) Originally defined in class Resource
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.