Module: Sinatra::RabbitHelper
- Defined in:
- lib/sinatra/rabbit.rb
Instance Method Summary collapse
Instance Method Details
#entry_points ⇒ Object
231 232 233 234 235 236 |
# File 'lib/sinatra/rabbit.rb', line 231 def entry_points collections.values.inject([]) do |m, coll| url = url_for coll.operations[:index].path, :full m << [ coll.name, url ] end end |
#query_url(url, params) ⇒ Object
226 227 228 229 |
# File 'lib/sinatra/rabbit.rb', line 226 def query_url(url, params) return url if params.nil? || params.empty? url + "?#{URI.escape(params.collect{|k,v| "#{k}=#{v}"}.join('&'))}" end |