I'm curious about calling class methods and whether there is any difference between:
class Jt
class << self
def say_hello
puts "I want to say hello"
end
end
end
class Jt2
def self.say_hello
puts "2 want to say hello"
end
end
Jt.say_hello
Jt2.say_hello
Is it just style or is there any difference in how ruby handle these? I always use the latter for Rails stuff but tend to see the former in meta-programming or Rails source code.