Consider the following three class definitions:

class Foo
  def self.bar
    @@bar
  end
  def self.bar=(val)
    @@bar = val
  end
end

class Foo
  class << self
    def bar
      @@bar
    end
    def bar=(val)
      @@bar = val
    end
  end
end

class Foo
  class << self
    attr_accessor :bar
  end
end

Am I correct in believing that they are equivalent? If not, how do they
differ?

--Greg