Exception: Rackful::HTTP201Created
- Inherits:
-
HTTPStatus
- Object
- RuntimeError
- HTTPStatus
- Rackful::HTTP201Created
- Defined in:
- lib/rackful/httpstatus.rb
Instance Attribute Summary (collapse)
-
- (void) headers
inherited
from HTTPStatus
readonly
Returns the value of attribute headers.
-
- (void) status
inherited
from HTTPStatus
readonly
Returns the value of attribute status.
-
- (void) to_rackful
inherited
from HTTPStatus
readonly
Returns the value of attribute to_rackful.
Instance Method Summary (collapse)
-
- (HTTP201Created) initialize(locations)
constructor
A new instance of HTTP201Created.
Constructor Details
- (HTTP201Created) initialize(locations)
Returns a new instance of HTTP201Created
120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/rackful/httpstatus.rb', line 120 def initialize locations locations = [ locations ] unless locations.kind_of? Array locations = locations.collect { |l| URI(l) } if locations.size > 1 super( 201, 'New resources were created:', :locations => locations ) else location = locations[0] super( 201, 'A new resource was created:', :Location" => location, 'Location' => location ) end end |
Instance Attribute Details
- (void) headers (readonly) Originally defined in class HTTPStatus
Returns the value of attribute headers
- (void) status (readonly) Originally defined in class HTTPStatus
Returns the value of attribute status
- (void) to_rackful (readonly) Originally defined in class HTTPStatus
Returns the value of attribute to_rackful