These seem to be identical. Are they?

class Foo
  def Foo.bar
    # some code
  end
end

class Foo
  def self.bar
    # some code
  end
end

If they are identical, is one form generally preferred over the other?

So a "class method" is the same as a "singleton method" on a Class object?

--
R. Mark Volkmann
Partner, Object Computing, Inc.