I have been following the “Stoooopid OOP question” stuff and I went
looking for some real-world examples of when to use the different sorts
of methods but all I can find are silly “foo / bar” type examples - can
someone point me to some simple examples that show me why there are
cases when methods should not be public?
I have been following the “Stoooopid OOP question” stuff and I went looking for
some real-world examples of when to use the different sorts of methods but all I
can find are silly “foo / bar” type examples - can someone point me to some simple
examples that show me why there are cases when methods should not be public?
Not sure how simple this is, but its fresh in my mind:
Most of the public methods are part of the API that normal users of this
gem will see: initializing, incrementing, decrementing, and inspecting
the counter.
The two private methods arent for public use. They allow the counter to
be deserialized by methods in the parent class, and for the parent class
to serialize counter operations.
Most of the public methods are part of the API that normal users of
this gem will see: initializing, incrementing, decrementing, and
inspecting the counter.
The two private methods aren???t for public use. They allow the
counter to be deserialized by methods in the parent class, and for the
parent class to serialize counter operations.