Join Kevin Skoglund for an in-depth discussion in this video Hashes, part of Ruby Essential Training.
In this movie we are going to take a look at the Ruby object type for hashes.…Before we start with hashes, you will want to make sure that you have a good…understanding of arrays, because hashes are going to be very similar.…Hashes are an unordered, object- indexed collection of objects.…So notice, first of all, that where an array is an ordered collection, a hash is…an unordered collection.…That's a very important difference.…We cannot count on the order that things are going to be stored in a hash.…And instead of being indexed by their position and keeping track of the number,…instead we are going to keep track of them using an object.…
We call this a key-value pair.…We have one object that's the key and it references a second object that's a value.…If you think back to the expanding file folder metaphor that I gave you when we…were talking about arrays, well, hashes work a little bit more like hanging file folders.…They are not in any certain order.…They can be rearranged.…Each of those file folders is going to have a label on it, and that's how we are…
- 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?
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.