Ruby - Modules and Mixins
What is wrong with this module declaration?
module Tools
def use
puts "Using tools"
end
end
Tools.usemodule Tools
def use
puts "Using tools"
end
end
Tools.useuse is an instance method inside the module.Tools.use tries to call a module method, but use is not defined as a module method or included in a class, causing error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions