© 2026 Dometrain. All rights reserved.
Learn Ruby by completing 142 browser exercises, from your first method to classes, collections, exceptions, and pattern matching.
You learn Ruby by writing it, yet the usual first step is installing the language and setting up an editor before a single method runs. This course skips that step: it teaches Ruby 3.4 through 142 exercises that run in the browser. Each exercise gives you starter code and a concrete task, so you can try an idea and see what your code does.
The course begins with values, methods, and conditionals. You then work through numbers, text, nil, method parameters, loops, arrays, blocks, hashes, ranges, and sets, using the collection methods that transform, group, and count their elements. Later chapters cover classes and objects that work together, modules, inheritance, records built with Struct and Data, raising and rescuing errors, lambdas and closures, and pattern matching. Six longer builds at the end combine those topics. Along the way, you practice choices that affect whether a result is reliable: representing money as integer cents, breaking ties when sorting, and reporting a failure clearly.
The course suits beginners who want to learn by writing Ruby. It concentrates on the language itself; dates, times, dependency management, and application frameworks are outside its scope.