I am reading this explanation of module methods for Ruby and how they are different from instance methods for classes. Here is the explanation I am reading:
Remember that unlike an instance method, a module method needs to be defined on the module itself. How do you access the module? Recall that inside a module definition, self refers to the module being defined. So you'll need to define the method using the form self.xxx.
I don't totally get it. When we defined methods inside Classes, we didn't have to define it on the class itself. We merely called it on the instantiated objects of the classes.
Why do we need to define module methods on the module itself using the term "self"? What's the purpose of this? Why can't we just define module methods without using the term self? Here is how my module skeleton looks:
module GameTurn
def self.take_turn(player)
end