Beginner Series: Ruby Tutorial
For starters, it doesn’t cost anything to develop with Ruby because the interpreter is free right along with several other language-specific tools.
In addition, Ruby is open-source which means anyone can modify the source code to meet their needs.
Other notable features include:
- Free format language – You can begin writing the code for your program anywhere, including any line or column.
- Ruby is case sensitive – In Ruby, lowercase and uppercase letters are separate. This means that keywords like puts and PUTS are different.
- Ruby supports comments – You can leave comments in your code by including an unquoted pound sign (#) followed by your text. The interpreter will ignore anything after it. In addition, you can write lengthy comments using the tags “=begin” and “=end” so long as those tags are the first characters of each line.
- Statement delimiters are available – In Ruby, semicolons are not required at the end of a line (but it is still recommended you use them). However, if you include multiple statements on a single line they must be separated by semicolons. You can also end a line with a backslash (\) and the linefeed following it is ignored by the interpreter. This allows you to write a single line of code that spans multiple lines (for better organization and readability).
- Ruby has keywords – Ruby has a set of reserved “keywords” (there are 41 in total) that cannot be used for anything else other than what they were inherently created for. This makes the coding process much simpler.
Next, let’s take a look at What is Ruby on Rails?.
Disclosure of Material Connection: Some of the links in the post above are “affiliate links.” This means if you click on the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers.