Ruby single inheritance (<) का समर्थन करता है — एक class एक superclass से inherit करता है। जब आप एक method call करते हैं, तो Ruby एक अच्छी तरह से परिभाषित method lookup path (ancestor chain, mixed-in modules सहित) में खोजता है। इस path को समझना यह स्पष्ट करता है कि inheritance और mixins methods को कैसे resolve करते हैं।
Single inheritance
() = = name
=
<
.new().speak
.new().fetch
