Syllabus

  1. 01Introduction to RubyPrint output, use Ruby's basic data types, do math, call methods on strings, and write comments.6 lessons
    1. 01Meet Ruby
    2. 02Math
    3. 03Strings and Methods
    4. 04Comments and Conventions
    5. 05Project: Username Builder
    6. 06Quiz: Introduction to Ruby
  2. 02Control FlowMake decisions with if, elsif, else and unless, compare values, combine conditions with boolean operators, and transform text with conditional logic.5 lessons
    1. 01if, elsif and else
    2. 02Comparisons and Boolean Operators
    3. 03case Statements
    4. 04Project: Pig Latin Translator
    5. 05Quiz: Control Flow
  3. 03Loops and IteratorsRepeat code with while, until and for loops, control loops with break and next, and use Ruby's iterators each and times.5 lessons
    1. 01while and until
    2. 02for Loops and Ranges
    3. 03Iterators with each and times
    4. 04Project: Vowel Report
    5. 05Quiz: Loops and Iterators
  4. 04Arrays and HashesStore ordered lists in arrays and key-value pairs in hashes, access and change their contents, and iterate over both.5 lessons
    1. 01Arrays
    2. 02Hashes
    3. 03Iterating Arrays and Hashes
    4. 04Project: Rainfall Bar Chart
    5. 05Quiz: Arrays and Hashes
  5. 05Methods, Blocks and SortingDefine your own methods with parameters, defaults, splats and return values, pass blocks to methods, and sort collections with sort, the spaceship operator and sort_by.5 lessons
    1. 01Defining Methods
    2. 02Blocks
    3. 03Sorting
    4. 04Project: Quiz Night Leaderboard
    5. 05Quiz: Methods, Blocks and Sorting
  6. 06Hashes and SymbolsMeet symbols, the modern hash syntax, converting between strings and symbols, and the hash methods you'll use every day.5 lessons
    1. 01Symbols
    2. 02Modern Hash Syntax
    3. 03Working with Hashes
    4. 04Project: Pantry Tracker
    5. 05Quiz: Hashes and Symbols
  7. 07Refactoring the Ruby WayWrite shorter, clearer Ruby with one-line conditionals, the ternary operator, conditional assignment, implicit returns and idiomatic iterators.4 lessons
    1. 01Concise Conditionals
    2. 02Idiomatic Iteration and Returns
    3. 03Project: Refactor a Receipt
    4. 04Quiz: Refactoring the Ruby Way
  8. 08Blocks, Procs and LambdasLearn how Ruby packages code to pass around: blocks and yield, Proc objects, symbol-to-proc shortcuts and lambdas, and how they differ.4 lessons
    1. 01Blocks and yield in Depth
    2. 02Procs
    3. 03Lambdas
    4. 04Quiz: Blocks, Procs and Lambdas
  9. 09Object-Oriented Programming, Part IDefine classes with initialize and instance variables, add methods, understand variable scope, and reuse code through inheritance and super.5 lessons
    1. 01Classes and Objects
    2. 02Variable Scope
    3. 03Inheritance
    4. 04Project: Community Garden Plots
    5. 05Quiz: Object-Oriented Programming, Part I
  10. 10Object-Oriented Programming, Part IIControl access with public and private methods, generate getters and setters with attr_reader, attr_writer and attr_accessor, and share behavior with modules and mixins.5 lessons
    1. 01Getters, Setters and attr_accessor
    2. 02Public and Private Methods
    3. 03Modules and Mixins
    4. 04Project: Library Card System
    5. 05Quiz: Object-Oriented Programming, Part II