lib/ghost_writer/writer/templates/rst.erb
<% if header -%>
<%= title %>
<%= "*" * title.length * 2 %>
<% end -%>
<%= description %>
<%= "=" * description.length * 2 %>
access path
----------------
::
<%= "#{request_method} #{path_info}" %>
request params
----------------------
.. code-block:: javascript
<%= serialized_params.each_line.map{|line| line.chomp.empty? ? line : " " + line}.join %>
status code
----------------------
::
<%= status_code %>
response
----------------------
.. code-block:: <%= response_format(true) %>
<%= response_body.each_line.map{|line| line.chomp.empty? ? line : " " + line}.join %>
Generated by <%= description %> at <%= location %>