Write Comments on Ruby!
How to write comments on Ruby
Comments in Ruby can be written in two ways:
- Single line comment
Single line comment followed by # symbol
1
# This is a single line comment.
- Multi line comments
Multiline comments starts with =begin and ends with =end
1
2
3
4
=begin
This is multiline comments.
One can write number of lines as per need.
=end
This post is licensed under
CC BY 4.0
by the author.