Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubyconst_missing included inherited hooksSingle-choice MCQ

A module defines `self.included(base)` and calls `base.extend(ClassMethods)`. What does this accomplish, and what is `base`?

module M def self.included(base) base.extend(ClassMethods) end module ClassMethods def hello; "hi"; end end end class C include M end puts C.hello