I
Iñaki Baz Castillo
Hi, I don't like the way of declaring publi and private methods since it's =
not=20
really clear. AFAIK there are you ways:
1)
class C
def public_1
end
def public_2
end
private:
def private_1
end
public:
def public_3
end
or:
2)
class C
def public_1
end
def public_2
end
def private_1
end
def public_3
private rivate_1
end
I prefer 2) but until the end of class it's not easy to know if a method is=
=20
public or private/protected. So i'm thinking about use a special nomenclatu=
re=20
for private methods, for example:
def _private_1
Is there any "standar" for this? I've seen lost of ethods called "__xxxx__"=
=20
or "_xxxxx" but not sure the reason of that name.
Thanks a lot.
=2D-=20
I=C3=B1aki Baz Castillo
not=20
really clear. AFAIK there are you ways:
1)
class C
def public_1
end
def public_2
end
private:
def private_1
end
public:
def public_3
end
or:
2)
class C
def public_1
end
def public_2
end
def private_1
end
def public_3
private rivate_1
end
I prefer 2) but until the end of class it's not easy to know if a method is=
=20
public or private/protected. So i'm thinking about use a special nomenclatu=
re=20
for private methods, for example:
def _private_1
Is there any "standar" for this? I've seen lost of ethods called "__xxxx__"=
=20
or "_xxxxx" but not sure the reason of that name.
Thanks a lot.
=2D-=20
I=C3=B1aki Baz Castillo