Skip to content

ljromero/rdoc-style-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rdoc Style Guide

A good, but unofficial, Rdoc style guide.

Table of Contents

Constants

  # * +0+ - Option 1
  # * +1+ - Option 2
  # * +2+ - Option 3
  OPTIONS = {opt1: 0,
             opt2: 1,
             opt3: 2}

alt tag

Warnings

  # *WARNING*: This is a warning comment to advise about
  # an specific behaviour.
  def index
  end

alt tag

Actions

  # This is the main goal of the method we are documenting. Please, write simple
  # and declarative sentences. Brevity is a plus: remember, get to the point.
  #
  # *WARNING*: This is a warning comment to advise about
  # an specific behaviour.
  #
  # ==== Params
  # * +p1+ - Integer - P1 little description.
  # * +p2+ - String - P2 little description.
  # * +p3+ - Hash - P3 little description.
  # * +p4+ - Array - P4 little description.
  #
  # ==== Returns
  # * +article+ - Article - Just created article.
  #
  # ==== Examples
  # Response example:
  #
  #    {"title"=>"First article!", "text"=>"This is my first article."}
  # ---
  def create
    render plain: params[:article].inspect
  end

References

License

Creative Commons License This work is licensed under a Creative Commons Attribution 3.0 Unported License