Join Kevin Skoglund for an in-depth discussion in this video Find, part of Ruby Essential Training.
In this movie we are going to see how we can use code blocks effectively with…various Ruby Find methods that allow us to find objects inside a dataset.…There are five main Find methods we will be looking at:…find, which also is a synonym of detect, find all, which also has a synonym of…select and then any?, all? and delete_if.…Now delete_if may not technically fall under the umbrella of Find, but what…we are really doing is finding something and then deleting it, all in one step.…So I am going to go ahead and include it here.…
The thing that all of these methods will have in common is that they are going…to take a code block and that code block for each and every one of them is going…to be a Boolean expression.…So code block does not necessarily have to be made up of sort of action…statements, things like puts or setting variables and all sorts of processing.…It can be a Boolean just as easily.…I think it will make a lot of sense once we try it.…Let's start by open up irb with a simple prompt and let's start out by using a range, …
- 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
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.