On Wed, Feb 3, 2010 at 10:13 AM, Charles R.
[email protected] wrote:
On 03/02/2010 11:37, Farrel L. wrote:
Foo#bar is usually used for instance methods, Foo.bar for class
methods. In this case I think Foo#bar is correct.
Ah, yes, I think I’ve seen that. And so Foo::Bar would be for a class within
refers to the constant named Bar within the namespace named Foo.
Foo could be either a Module or a Class
The value of Bar could be a Module, a Class, or actually any value
Baz = 42
Foo is a module here,
Foo::Bar is a class
Foo::ClassMethods is a module
Foo:Bar::Baz is an integer.