Exception: Rackful::HTTP201Created

Inherits:
HTTPStatus
  • Object
show all
Defined in:
lib/rackful/httpstatus.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

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