Ruby Comments

Ruby comments
-------------

Use the '#' symbol for a single-line comment:

# This is a ruby-style comment.
# It's more readable if you leave a space after the '#'


In order to do multiline comments in ruby:

=begin

This is a lesser known (or at least less used) method of commenting in ruby.

It allows you to comment out multiple lines without all the clutter at the
beginning of each line.

It also allows you to make cool ASCII art:

RRRRR U U BBBBB Y Y
R R U U B B Y Y
R R U U B B Y Y
RRRRR U U BBBBB Y
R R U U B B Y
R R U U B B Y
R R UUUUU BBBBB Y

=end

Make those comments!

No comments: