Join Kevin Skoglund for an in-depth discussion in this video Conditionals: if, else, elsif, part of Ruby Essential Training.
In this chapter, we are going to be talking about the control structures inside Ruby.…In the previous chapter, we were talking about a lot of the basic object types, …but we really don't get that far if we are just assigning different…objects to variables.…Control structures are really going to provide the action that happens inside…of our Ruby programs.…It's what's going to decide what takes place under certain circumstances…and the first way that we are going to determine those circumstances is…using conditionals.…So this is, if something is true, we are going to do one thing.…If it's not true, do something else.…
Right, that's the basic thing.…We will run one set of code under one condition, another under…different conditions.…That's why they are called conditionals.…To do that, we are going to use the syntax of conditionals, which is going to be…if and then a boolean expression and then end at the end and then in between…will be the code that we want to take place if that Boolean value evaluates to true.…
- Using Ruby in the Interactive Ruby Shell and in standalone scripts
- Learning to write custom code blocks to find, merge, and sort
- Using modules for namespacing or as mix-ins
- Reading from and writing to files
- Creating a full Ruby project from start to finish
Skill Level Beginner
Q: You mention e-texteditor.com as a place to get a Windows "sister" version of TextMate. However, e-texteditor.com looks like a Chinese auto website. Are there any other alternatives?
A: E-texteditor.com appears to have gone out of business. On Windows, you should use Sublime (<a target="_blank" href="http://www.sublimetext.com/">http://www.sublimetext.com/</a>) or Notepad++ (<a target="_blank" href="http://notepad-plus-plus.org/">http://notepad-plus-plus.org/</a>) instead.
1. Getting Started with Ruby
2. Ruby Object Types
3. Control Structures
4. Code Blocks
8. Working with Files
9. Ruby Project: Creating the Food Finder
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.