Class: Sinatra::Browse::KusoHtml
- Inherits:
-
BrowseFormat
- Object
- BrowseFormat
- Sinatra::Browse::KusoHtml
- Defined in:
- lib/sinatra/browse/format.rb
Instance Method Summary collapse
Methods inherited from BrowseFormat
Constructor Details
This class inherits a constructor from Sinatra::Browse::BrowseFormat
Instance Method Details
#generate ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/sinatra/browse/format.rb', line 24 def generate output = "" @browse_routes.each { |name, route| output += "<h3>#{name}</h3>" output += "<p>#{route.description}</p><ul>" route.parameters.each { |param_key, param_value| output += "<li>#{param_key} #{param_value.to_s}</li>" } output += "</ul>" } output end |