Ruby Blocks
Treehouse
Course Summary
In this course, you’ll learn all about blocks in Ruby. Blocks are a piece of syntax that you can use in Ruby to accomplish all kinds of amazing programming feats. Ruby programmers make constant use of blocks so they are an important piece of the language to learn.
-
+
Course Description
About this Course In this course, you’ll learn all about blocks in Ruby. Blocks are a piece of syntax that you can use in Ruby to accomplish all kinds of amazing programming feats. Ruby programmers make constant use of blocks so they are an important piece of the language to learn. What you'll learn
- Ruby Blocks
- Ruby Classes
- Block Arguments
- Yield
About the Teacher
Jason helped launch Treehouse and spent 4 years teaching here before returning to Rails development full time.
-
+
Course Syllabus
Ruby Blocks
In this stage, you'll learn how blocks work in Ruby. You'll learn what blocks are, different ways they can be called, and how to pass arguments to a block. 8 steps- What Are Blocks? 3:59
- Practice Writing a Block 1 objective
- Write a Block Method 4:42
- Write a Block Method 1 objective
- Block Arguments 6:09
- Block Arguments 1 objective
- Calling Blocks 5:37
- Calling Blocks 1 objective
Working With Blocks
It's important to learn how blocks work in the real world. In this stage, you'll explore how blocks work in some of Ruby's built in types. You'll also learn how to create your own classes that implement methods with blocks. 8 stepsBlocks Practice
It's important to practice what you've learned! In this stage, we'll practice using blocks by writing a Monster class that makes heavy use of blocks, hashes, and more. 8 steps