Home / Programming MCQs / Ruby MCQs / Question

M

Mr. Dubey • 51.17K Points
Coach

Q. 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

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.