Join Kevin Skoglund for an in-depth discussion in this video Inheritance, part of Ruby Essential Training.
- View Offline
- Exercise Files
In this movie we're going to talk about class inheritance.…Now this is not the same as inheritance in the real world where you inherit…money and objects and things like that from your ancestors, instead in…object-oriented programming inheritance refers to inheriting the methods and the…attributes of another class.…It's a very common feature in almost all aspects of object-oriented programming…and Ruby is no different.…Let's say for example that we have our Animal class that we have been working with.…Up until now we've been creating instances of that Animal class.…We can create several instances and then we can give attributes to…those instances, right?…Cow, pig, and duck, we can give them sounds.…
Well, instead of doing that we could also have the ability to create…subclasses, classes that would inherit information from animal which would be…their own unique class.…So instead we can have the animal class and create a new class called cow, and…that cow class would inherit all of the behaviors of the animal class, but it…
- 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.