- [Instructor] In this chapter, we're going…to learn about inheritance, or more specifically…class inheritance, in Ruby.…Class inheritance is a fundamental part…of object-oriented programming.…You probably already know what inheritance means, right?…I mean, we inherit our genes from our parents.…You might inherent money from someone.…It's things that are passed down to you.…And the same idea is here true with class inheritance.…Class inheritance is the bestowal of behaviors…from another class.…When we say behaviors, we're talking about…attributes and methods.…So attributes and methods are being passed…from one class to another one.…
So, for example, up until now we've been working…with an animal class.…And when we wanted to create instances…of the animal class, we created new instances…and then we changed attributes from each one…of those to give it a name or give it a noise…to make it different and unique.…That works just fine.…You can certainly do that.…But there's another approach to this,…which is to use inheritance instead.…
- Defining a custom class
- Working with instances of a class
- Class and instance attributes and methods
- Class inheritance
- Working with dates and times
- Using modules as namespaces and mixins
- Raising and handling exceptions
Skill Level Beginner
2. Class Attributes and Methods
4. Dates and Times
- 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.