Class | Sinatra::Rabbit::Collection |
In: |
lib/sinatra/rabbit.rb
|
Parent: | Object |
name | [R] | |
operations | [R] |
Set/Return description for collection If first parameter is not present, full description will be returned.
Add a new operation for this collection. For the standard REST operations :index, :show, :update, and :destroy, we already know what method to use and whether this is an operation on the URL for individual elements or for the whole collection.
For non-standard operations, options must be passed:
:method : one of the HTTP methods :member : whether this is an operation on the collection or an individual element (FIXME: custom operations on the collection will use a nonsensical URL) The URL for the operation is the element URL with the name of the operation appended
This also defines a helper method like show_instance_url that returns the URL to this operation (in request context)