1

I am working in live project and understanding the existing code. like

Module Rating
  def current_rating 
     # some code here
  end
end

And called this method in included class. How it works? Actually I know about module but not used much. Say I am beginner for Module

Sourabh Upadhyay
  • 1,034
  • 11
  • 31
Rohan
  • 13
  • 3

1 Answers1

0

module_function

Module methods that are declared as module_function will create copies of themselves as private instance methods in the class that includes the Module:

check this link: Hidden features of Ruby

Community
  • 1
  • 1
Sourabh Upadhyay
  • 1,034
  • 11
  • 31