1

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?

messivanio
  • 2,263
  • 18
  • 24
fearless_fool
  • 33,645
  • 23
  • 135
  • 217

1 Answers1

0

Since Padrino is based on Sinatra, documenting routes is doable with this gem yard-sinatra.

Synoptase
  • 53
  • 1
  • 5