BrunoMiranda.com

Personal Blog about Software Engineering, Design, Travel & More

Multi-line Ruby Comment

Posted on June 12, 2007 at 04:41 PM

For those coming from C/C++ use to doing multi-line comments with /* */, you may find yourself looking for a way to do the same in ruby. Single-line comments are easily done with # comment. Here how to do it muli-line:

=begin
  This is a multi-line
  comment in ruby
=end def skipped_method end

def interpreted_method

end

Note =end is not a token delimiter, everything on the same line as =end will be skipped by the interpreter as well.

Tags: ruby
Hierarchy: previous, next

Comments

There are 0 comments on this post. Post yours →

Post a comment

Required fields in bold.

 

Visit the Archives →