J
Jonas Pfenniger
Hi,
I always see the # notation in the docs to design instance_methods.
Wouldn't it be nice to be able to use that notation to address and
access methods directly ?
MyClass#my_method would replace MyClass.instance_methodmy_method)
and
def MyClass#my_method end would replace class MyClass; def my_method end end
Similarily, I was also thinking that :: could be used for class methods.
What do you think ?
The biggest drawback I see actually is that it would impose comments
to have one space before. Like :
MyClass#some comment #=> Error
MyClass #some comment #=> All OK
I always see the # notation in the docs to design instance_methods.
Wouldn't it be nice to be able to use that notation to address and
access methods directly ?
MyClass#my_method would replace MyClass.instance_methodmy_method)
and
def MyClass#my_method end would replace class MyClass; def my_method end end
Similarily, I was also thinking that :: could be used for class methods.
What do you think ?
The biggest drawback I see actually is that it would impose comments
to have one space before. Like :
MyClass#some comment #=> Error
MyClass #some comment #=> All OK