I\'ve been coding in Ruby for sometime now, but I don\'t understand when to use:
def self.METHOD_NAME
end
or just:
def METH
A good guide on when to use which one:
self.
) method.When making a class method, think carefully about which class or module it belongs in. If you ever catch yourself duplicating code in class methods across classes, factor it into a module that other classes may mix in.