Ruby - Advanced Metaprogramming
Identify the error in this Ruby code using the included hook:
module M
def included(base)
base.extend(ClassMethods)
end
module ClassMethods
def hello
"Hi"
end
end
end
class C
include M
end
puts C.hello