server/lib/sinatra/rabbit.rb
def collection(name, &block)
      raise DuplicateCollectionException if collections[name]
      collections[name] = Collection.new(name, &block)
      collections[name].generate
    end
# Create a new collection. NAME should be the pluralized name of the
# collection.
#
# Adds a helper method #{name}_url which returns the URL to the :index
# operation on this collection.
Create a new collection. NAME should be the pluralized name of the
collection.

Adds a helper method #{name}_url which returns the URL to the :index
operation on this collection.
Create a new collection . NAME should be the pluralized name of the collection . Adds a helper method # { name } _url which returns the URL to the : index operation on this collection .
def collection(name, &block)
      raise DuplicateCollectionException if collections[name]
      collections[name] = Collection.new(name, &block)
      collections[name].generate
    end
def collection ( name , & block ) raise DuplicateCollectionException if collections [ name ] collections [ name ] = Collection . new ( name , & block ) collections [ name ] . generate end
Create a new collection.
Create a new collection .
name
block