Class Sinatra::Rabbit::Collection
In: lib/sinatra/rabbit.rb
Parent: Object

Methods

Attributes

name  [R] 
operations  [R] 

Public Class methods

Public Instance methods

Set/Return description for collection If first parameter is not present, full description will be returned.

Mark this collection as global, i.e. independent of any specific driver

Return true if this collection is global, i.e. independent of any specific driver

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)

[Validate]