Join Kevin Skoglund for an in-depth discussion in this video Instances, part of Ruby Essential Training.
Now that we know how to define a class and how to create an object from it, we…need to talk about instances, and have an understanding of what an instance is,…because an instance is a fundamental concept in object-oriented programming, and…it's going to be central to working with classes.…Outside of programming, the typical definition for instance might be a case or…an occurrence, an example put forth.…So what we are talking about when we talk about programming is a very similar thing.…We are talking about an occurrence of our class. That's what it is.…It is an object that's being created from a class.…
So when we created Animal.new, we created an instance of the class animal, and…then we assigned it to a variable.…Now, before I was just saying it's an object that we created, but it's an instance.…You want to start using that word.…You can use object too when you are talking about it.…That's perfectly fine. It is an object.…But it's an instance of a class, and that's very important for us.…
- 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.