BigW Consortium Gitlab

grape.rake 360 Bytes
Newer Older
1 2 3 4
namespace :grape do
  desc 'Print compiled grape routes'
  task routes: :environment do
    API::API.routes.each do |route|
5
      puts "#{route.options[:method]} #{route.path} - #{route_description(route.options)}"
6 7
    end
  end
8 9

  def route_description(options)
10
    options[:settings][:description][:description] if options[:settings][:description]
11
  end
12
end