1. Core Data Structures
Ruby provides several built-in data structures for organizing information in programs. A Symbol is a lightweight, immutable identifier written with a leading colon, such as :status...
Read full chapter →The essential Ruby Programming cheat sheet: 7 concise chapters you can read in minutes, distilled from the full deck. When you're ready, drill the flashcards or test yourself under exam conditions.
Ruby provides several built-in data structures for organizing information in programs. A Symbol is a lightweight, immutable identifier written with a leading colon, such as :status...
Read full chapter →Ruby treats blocks of code as first-class values that can be passed to methods. A block is an anonymous chunk of code written either with curly braces or with the do and end keywor...
Read full chapter →Ruby is fundamentally object-oriented, and classes are defined with the class keyword followed by the class name and a body of method definitions. When an object is created with Cl...
Read full chapter →Iteration is at the heart of idiomatic Ruby, and most collection methods are powered by the Enumerable module. The each method is the workhorse of iteration: it walks through a col...
Read full chapter →Ruby programs use a structured exception handling mechanism built around the begin, rescue, and ensure keywords. Risky code is wrapped in a begin block, and any raised exception th...
Read full chapter →Strings in Ruby can be constructed with single or double quotes, but only double-quoted strings support interpolation, where the result of any Ruby expression can be embedded with...
Read full chapter →One of Ruby's most distinctive features is metaprogramming, the ability to write code that writes or modifies code at runtime. The define_method method dynamically defines an insta...
Read full chapter →Done reading?
Test yourself with the Ruby Programming practice exam — timed questions, instant score, full review of wrong answers. Free.
🎯 Take the Practice Exam →