Class/Module Index [+]

Quicksearch

Sinatra::Rabbit

Public Class Methods

routes() click to toggle source
# File lib/sinatra/rabbit.rb, line 26
def self.routes
  @routes ||= []
end

Public Instance Methods

collection(name, &block) click to toggle source

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.

# File lib/sinatra/rabbit.rb, line 390
def collection(name, &block)
  raise DuplicateCollectionException if collections[name]
  collections[name] = Collection.new(name, &block)
  collections[name].generate
end
collections() click to toggle source
# File lib/sinatra/rabbit.rb, line 381
def collections
  @collections ||= {}
end
global_collection(name, &block) click to toggle source
# File lib/sinatra/rabbit.rb, line 396
def global_collection(name, &block)
  raise DuplicateCollectionException if collections[name]
  collections[name] = Collection.new(name, { :global => true }, &block)
  collections[name].generate
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.