Ruby - Modules and Mixins
Identify the error in the following Ruby module declaration:
module Tools
def help
"Help message"
end
end
Tools.helpmodule Tools
def help
"Help message"
end
end
Tools.helphelp is defined as an instance method, but called on the module directly.Tools.help, help must be a module method defined with self.help.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions