OOP in Ruby: classes, initialize, inheritance, modules, and interactive use with irb
About the free online course
Build a strong foundation in Ruby and start turning ideas into working programs with a beginner-friendly learning path designed for practical progress. This free online course guides you from your first setup to writing code you can run confidently, even if you are brand new to programming. By focusing on how Ruby works in real situations, you will gain the skills to read, write, and improve scripts that solve everyday problems.
You will begin by getting Ruby installed on your computer and making sure everything is running correctly, then move straight into writing your first program. As you practice, you will learn how Ruby handles output and how to control what your program shows on the screen. From there, you will work with variables and core data types, learn to manipulate strings cleanly, and use math operations in ways that match how Ruby evaluates expressions. Along the way, short exercises reinforce key concepts so they actually stick.
To help you think like a developer, the course emphasizes interaction and logic: reading user input, converting that input into the right numeric types, and using conditionals to make decisions in code. You will see how to write reusable methods, understand return values, and choose cleaner structures such as case expressions when multiple conditions appear. As your confidence grows, loops will help you automate repetitive tasks and build small interactive experiences that sharpen your problem-solving mindset.
You will also learn essential data structures such as arrays and hashes so you can organize information efficiently, plus file reading and writing so your programs can work with real data. Error handling techniques will help your scripts behave more reliably, and you will get an introduction to object-oriented Ruby with classes, initialize patterns, object methods, inheritance, and modules. By the end, you will be comfortable experimenting in irb, navigating Ruby syntax, and continuing into more advanced projects with a solid base for backend development, scripting, automation, or further study.
Course content
Video class: Introduction | Ruby | Tutorial 101m
Exercise: Which of the following topics is not covered in the introductory Ruby course described in the text?
Video class: Windows Installation | Ruby | Tutorial 203m
Exercise: What is the correct first step to install Ruby on a Windows computer using the method described?
Video class: Mac Installation | Ruby | Tutorial 302m
Exercise: What command can you enter in the terminal to check the installed version of Ruby on OS X?
Video class: Hello World / Setup | Ruby | Tutorial 405m
Exercise: What extension should be used when creating a Ruby file?
Video class: Drawing a Shape | Ruby | Tutorial 506m
Exercise: What is the difference between the 'print' and 'puts' commands in Ruby?
Video class: Variables | Ruby | Tutorial 610m
Exercise: What is the main purpose of using variables in a Ruby program?
Video class: Data Types | Ruby | Tutorial 705m
Exercise: In Ruby, which of the following data types can be used to represent a true or false value?
Video class: Working With Strings | Ruby | Tutorial 811m
Exercise: What method can be used in Ruby to remove leading and trailing spaces from a string?
Video class: Math09m
Exercise: In Ruby, what will be the result of the operation 15 / 4, and why?
Video class: Getting User Input | Ruby | Tutorial 1008m
Exercise: What issue can occur when using gets method in Ruby when entering user data?
Video class: Building a Calculator | Ruby | Tutorial 1107m
Exercise: In Ruby, what method is used to convert a string input from the user into an integer for arithmetic operations?
Video class: Building a Mad Libs Game | Ruby | Tutorial 1204m
Exercise: What is the main purpose of getting user input in the Mad Libs game creation described?
Video class: Arrays | Ruby | Tutorial 1309m
Exercise: What is the primary advantage of using arrays in Ruby as opposed to simple variables?
Video class: Hashes | Ruby | Tutorial 1406m
Exercise: What is a key advantage of using hashes over arrays in Ruby programming?
Video class: Methods | Ruby | Tutorial 1508m
Exercise: What is a method in Ruby?
Video class: Return Statement | Ruby | Tutorial 1605m
Exercise: In Ruby, what happens when a return keyword is used inside a method?
Video class: If Statements | Ruby | Tutorial 1712m
Exercise: In Ruby, what is the purpose of using an 'if statement'?
Video class: If Statements (con't) | Ruby | Tutorial 1807m
Exercise: What is the purpose of using comparison operators in an if statement in Ruby?
Video class: Building a Better Calculator | Ruby | Tutorial 1908m
Exercise: In a Ruby program to create a calculator that can add, subtract, multiply, and divide, what Ruby method is used to convert user input from the command line into a number with decimal precision?
Video class: Case Expressions | Ruby | Tutorial 2009m
Exercise: What is the primary benefit of using a case expression over multiple if statements in Ruby?
Video class: While Loops | Ruby | Tutorial 2106m
Exercise: What is a 'while loop' commonly used for in Ruby programming?
Video class: Building a Guessing Game | Ruby | Tutorial 2213m
Exercise: In the guessing game built using Ruby, what method is used to remove the newline character from user input?
Video class: For Loops | Ruby | Tutorial 2304m
Exercise: In Ruby, what does a 'for loop' allow you to do?
Video class: Exponent Method | Ruby | Tutorial 2405m
Exercise: In Ruby, what is the purpose of an exponent method that uses a for loop?
Video class: Comments | Ruby | Tutorial 2504m
Exercise: What symbol is used to start a comment in Ruby?
Video class: Reading Files | Ruby | Tutorial 2608m
Exercise: What is the purpose of using 'file.close' in a Ruby program?
Video class: Writing Files | Ruby | Tutorial 2708m
Video class: Handling Errors | Ruby | Tutorial 2808m
Video class: Classes10m
Video class: Initialize Method | Ruby | Tutorial 3007m
Video class: Object Methods | Ruby | Tutorial 3105m
Video class: Building a Quiz | Ruby | Tutorial 3209m
Video class: Inheritance | Ruby | Tutorial 3307m
Video class: Modules | Ruby | Tutorial 3405m
Video class: Inteactive Ruby (irb) | Ruby | Tutorial 3504m