Chapter I - Introduction to Ruby
(avr. time for this chapter: 1 day)
Ruby is an interpreted, high-level, general-purpose programming language that supports multiple programming paradigms. Designed with an emphasis on programming productivity and simplicity, Ruby treats everything as an object, including primitive data types. It was developed in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan.
Ruby is dynamically typed and uses garbage collection and just-in-time compilation. It supports procedural, object-oriented, and functional programming paradigms.
In this chapter, the objective is to explore the fundamentals of Ruby, which will serve as the foundation for the next chapters where you will delve into Rails, one of the most popular frameworks built with Ruby.
Ruby in Twenty Minutes
A concise Ruby tutorial that should take no more than 20 minutes to complete.
Steps to implement:
- Ensure Ruby is installed on your system
- Complete the quick start tutorial
- Experiment with the Interactive Ruby Shell (IRB)
Reference: Ruby Quick Start
Installation Guide: Ruby Installation
Ruby Koans
The Koans guide you along the path to enlightenment in order to learn Ruby. The goal is to understand the Ruby language, syntax, structure, and common functions and libraries through test-driven exercises.
Steps to implement:
- Clone or download the Ruby Koans repository
- Run the koans and fix each failing test
- Focus on the recommended koans listed below
Reference: Ruby Koans
Recommended Koans:
about_arrays.rbabout_blocks.rbabout_classes.rbabout_control_statements.rbabout_hashes.rbabout_iteration.rbabout_methods.rbabout_strings.rbabout_symbols.rb
Ruby Tutorial
This tutorial covers basic to advanced concepts related to Ruby scripting.
Steps to implement:
- Read and practice the following topics
- Write small code snippets to reinforce each concept
- Understand how these concepts apply to real-world scenarios
Reference: TutorialsPoint Ruby
Topics to cover:
- Ruby - Classes and Objects
- Ruby - Variables
- Ruby - Operators
- Ruby - Methods
- Ruby - Blocks
- Ruby - Modules
- Ruby - Exceptions