"Ruby Operators and Control Structures" was retired on November 27, 2017. You are now viewing the recommended replacement.
- Ruby
- Beginner
About this Course
Ruby is a programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. In Ruby Basics, we'll learn how to work with Ruby and write simple Ruby programs.
What you'll learn
- Ruby syntax
- Objects
- Strings
- Numbers
- If statements
Ruby Syntax
Learn the basics of writing Ruby programs! You'll see how to define and call methods, and how to store data in variables.
16 steps-
Your First Ruby Program
3:14
-
Course Overview
1:56
-
Our Feature List
0:57
-
Methods
6:38
-
Methods
5 questions
-
Methods
1 objective
-
Comments
1:36
-
Defining Methods
4:00
-
Defining Methods
1 objective
-
Variables
5:15
-
Variables
1 objective
-
Method Arguments
7:02
-
Method Arguments
1 objective
-
Method Return Values
11:42
-
Method Return Values
1 objective
-
Review
4 questions
Strings
Almost every program needs to work with text. Programming languages represent text using "strings". In this stage we'll take a look at Ruby's powerful features for working with strings.
8 stepsObjects
In Ruby, almost every piece of data is an "object". That means the data has useful methods attached to it that you can call. In this stage, we'll learn how to use these methods!
4 stepsNumbers
Almost every program needs to work with numbers, too. We'll learn about Ruby's two most common types of numbers, how to do math with them, and how to call methods on them.
8 stepsConditionals
Sometimes you'll need to run a piece of code only under certain conditions. Conditionals like if
and unless
allow you to do that!
Teacher
-
Jay McGavren
Resident Ruby and Go teacher for Treehouse. Author of Head First Ruby, a tutorial book on the core Ruby language.