What is the primary difference between module_function and extend self in Ruby?
A. module_function makes the specified methods accessible as module methods, while extend self makes them accessible as instance methods
B. module_function makes the specified methods private, while extend self makes them public
C. module_function creates a new module, while extend self extends the current module
D. module_function makes the specified methods singleton methods, while extend self makes them instance methods
Answer: Option A
What is metaprogramming in Ruby?
A. Writing code that modifies its own structure
B. Writing code that writes code
C. Writing code that generates other code
D. Writing code that optimizes performance
Which Ruby module provides reflection capabilities for classes, modules, and objects?
A. Kernel
B. MetaModule
C. ObjectSpace
D. Reflection
What is the purpose of the method_missing method in Ruby?
A. Intercepting method calls before they are executed
B. Defining custom method behaviors based on method names
C. Handling undefined method calls
D. Providing default implementations for missing methods
What is a singleton class in Ruby?
A. A class that can have only one method
B. A class that is used to define methods for a single object
C. A class that can have only one subclass
D. None of the above

Join The Discussion