I'd like to use RDoc to document API calls in a web services app written in Padrino. Here's an example file:
Analytics.controller :api do
diable :layout
##
# = <base_url>/ping - test for response
# The +ping+ command is a quick way to verify a live connection to the
# service.
get :ping, :provides => :json do
{:time => timestamp(), :version => version_string()}.to_json
end
end
But since there's no surrounding Class, rdoc doesn't create documentation for the :ping method. Of course I can document the API calls in a separate file using rdoc or markup, but that seems so twentieth-century.
How do other people handle this?
Since Padrino is based on Sinatra, documenting routes is doable with this gem yard-sinatra.