Hey there,
Recently I was looking over some different ways of defining 'the same junk' within a module, example below;
module MyFunkyModule def the_same_junk # do junk end module_function :the_same_junk def self.the_same_junk # do junk end class << self def the_same_junk # do junk end endendObviously, there is some visual difference to the way the code is written, but what else? Are there actually subtle differences in what its doing to the module its defined in ??
Recently I was looking over some different ways of defining 'the same junk' within a module, example below;
module MyFunkyModule def the_same_junk # do junk end module_function :the_same_junk def self.the_same_junk # do junk end class << self def the_same_junk # do junk end endendObviously, there is some visual difference to the way the code is written, but what else? Are there actually subtle differences in what its doing to the module its defined in ??
