Pebellslearn by building
RoadmapsMatrixCoursesSandboxSign in

Course details

Ruby

Learn the fundamentals of Ruby, the language designed to make programmers happy. You will set up a current Ruby, then work with its data types, operators, conditions and loops, all through one small coffee-cart script.

Ready to learn6 sections · 23 lessons
Start learning

Course curriculum

Introduction and Setup3 lessons

What makes Ruby different, how to install your own Ruby instead of the system one, and how version managers let each project choose its Ruby.

  1. What Ruby Is12 min
  2. Package Managers and Installers12 min
  3. Version Managers15 min
Ruby Basics4 lessons

Store values in variables and constants, print them with puts, print and p, leave useful comments, and name things the way Ruby programmers expect.

  1. Variables and Constants12 min
  2. puts, print and p12 min
  3. Comments12 min
  4. Naming Conventions15 min
Data Types5 lessons

Work with integers and floats, strings and symbols, true, false and nil, arrays and hashes, and convert one type into another without surprises.

  1. Integers and Floats12 min
  2. Strings and Symbols12 min
  3. Booleans and nil12 min
  4. Arrays and Hashes12 min
  5. Type Casting15 min
Operators5 lessons

Use arithmetic, comparison, logical and assignment operators and ranges, and predict exactly what each one returns, including the Ruby-specific surprises.

  1. Arithmetic Operators12 min
  2. Comparison Operators12 min
  3. Logical Operators12 min
  4. Assignment Operators12 min
  5. Ranges15 min
Conditional Statements3 lessons

Choose between paths with if, elsif and else, write clear guards with unless, and match one value against many cases with case and when.

  1. if, elsif and else12 min
  2. unless12 min
  3. case and when15 min
Loops and Iteration3 lessons

Loop on a condition with while, until and loop, go through collections with each and times, and steer any loop with break, next and redo.

  1. while, until and loop12 min
  2. each, times and for12 min
  3. break, next and redo15 min