# File lib/sinatra/rabbit.rb, line 259
      def generate
        operations.values.each { |op| op.generate }
        app = ::Sinatra::Application
        collname = name # Work around Ruby's weird scoping/capture
        app.send(:define_method, "#{name.to_s.singularize}_url") do |id|
            url_for "/api/#{collname}/#{id}", :full
        end

        if index_op = operations[:index]
          app.send(:define_method, "#{name}_url") do
            url_for index_op.path.gsub(/\/\?$/,''), :full
          end
        end
      end