Skip to content

Instantly share code, notes, and snippets.

@rue
Created December 15, 2011 00:29
Show Gist options
  • Save rue/1479270 to your computer and use it in GitHub Desktop.
Save rue/1479270 to your computer and use it in GitHub Desktop.
The right way to comment
# The correct way is to do this.
#
# Possibly with some additional stuff here,
# but note the trail.
#
module YayComments
##
# Sometimes you need the double-hash, so you do this.
#
# And continue here as needed.
#
attr_accessor :wee
# This is not good,
# leaving a space.
def foo
end
## And this I really don't like either
# because it just looks weird.
def moomin
end
# Sometimes I leave a space here, but I might not.
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment