I did not understand the difference .Could you please
explain this?
Because those two statements run at very different times. Once when
the module is being defined (self is the module) the second runs when
one of the instance methods runs in which case self is the object in
question.