Changes

Jump to: navigation, search

Commenting Ruby Code

6 bytes removed, 14:39, 13 March 2009
Multi Line or Block Ruby Comments
== Multi Line or Block Ruby Comments ==
Multiple lines of text or code can be defined as comments using the Ruby ''==begin'' and ''==end'' comment markers. These are known as the comment block markers.
For example, to provide a comment block containing multiple lines of descriptive text:
<pre>
==begin
This is a comment line
it explains that the next line of code displays
a welcome message
==end
</pre>
<pre>
==begin
print "Welcome to Ruby Essentials!"
print "Everything you need to know about Ruby"
==end
</pre>

Navigation menu