Classes and "<" Meaning

I never understood two things about Ruby:

1. What a "class" is (no, I don't mean like a warrior or something)

2. Why people put "<" between the name of two classes. For example: class Window_Base < Window

Why are these so significant?
1. (Credit goes to wikipedia since Im too lazy to type it out in my own words) In object-oriented programming, a class is an extensible program-code-template for creating objects, providing initial values for state (member variables) and implementations of behavior (member functions or methods). 

Ruby is an object-oriented programming language.

2. < is the inheritance symbol.  In object-oriented programming, object can inherit properties,methods,etc from other classes. Window_Base is inheriting the class Window. An example that may make it easier to understand is Cat < Mammal. A cat is a mammal, so it is inheriting everything a mammal has, it can then overwrite those things with its own versions.
1. (Credit goes to wikipedia since Im too lazy to type it out in my own words) In object-oriented programming, a class is an extensible program-code-template for creating objects, providing initial values for state (member variables) and implementations of behavior (member functions or methods). 

Ruby is an object-oriented programming language.

2. < is the inheritance symbol.  In object-oriented programming, object can inherit properties,methods,etc from other classes. Window_Base is inheriting the class Window. An example that may make it easier to understand is Cat < Mammal. A cat is a mammal, so it is inheriting everything a mammal has, it can then overwrite those things with its own versions.
Oh, I got it now. Thanks for the info! I am one step closer to becoming a great programmer!

(Or possibly cause my computer to spontaneously explode.)
Another question: Can a class inherit two other classes at once?
Another question: Can a class inherit two other classes at once?

quick answer, no
You can have something like this:


class a


end


class b < a


end


class c < b


end


which means c is inherited from b, which itself is inherited from a, so c has all the properties and methods of both a and b.
You can have something like this:


class a


end


class b < a


end


class c < b


end


which means c is inherited from b, which itself is inherited from a, so c has all the properties and methods of both a and b.

Seems easy enough, thanks!

Original thread: https://forums.rpgmakerweb.com/threads/classes-and-meaning.53952/