Subject: singleton definition differences
From: Nicholas Randal <nrandal dslextreme.com>
Date: Wed, 23 Jan 2008 12:10:04 +0900
would someone please explain the difference between these definitions
class A
class << self
def hello
puts 'hello'
end
end
end
class B
def B.hello
puts 'hello'
end
end
A.hello
B.hello