Difference between module and class based testbench

broken image
broken image

'Class methods' and 'module methods' are really just singleton methods of an object which just happens to be an instance of the Module class or the Class class. We sometimes use the word 'class method' or 'module method' out of convenience when talking about a certain pattern of using instance methods, but there is no such concept in Ruby. Ruby has exactly one kind of method: instance methods. There is no such thing as a 'class method' or a 'module method' in Ruby. Considering that they are both just instance methods, and thus the same thing, there cannot possibly be any difference. Tl dr: There are no class methods and module methods in Ruby, only instance methods.

broken image