You can write a comment that spans multiple lines by starting each line with a
#, but there’s an easier way. If you start with
=begin and end with
=end, everything between those two expressions will be a comment. Take a look at this example:
=begin I'm a comment! I don't need any # symbols. =end
Don’t put any space between the
= sign and the words
end. You can do that with math (
2 + 5 is the same as
2+5), but in this case, Ruby will get confused.
=end also need to be on lines all by themselves, just as shown above.
Create a multi-line comment in the editor to the right. Make sure
=end are on their own lines!