F
Felipe
I'm reading PickAxe book and just finished reading chapter 3, which
talks about classes, objects and variables. While this chapter (and the
whole book so far) was very informative, I have two doubts:
- return seems to be used when defining methods and nowhere else. Why
use it (why not use puts)?
- Why and where specify access control (public, protected and private
methods)? The examples in the book weren't clear enough.
Thanks in advance.
talks about classes, objects and variables. While this chapter (and the
whole book so far) was very informative, I have two doubts:
- return seems to be used when defining methods and nowhere else. Why
use it (why not use puts)?
- Why and where specify access control (public, protected and private
methods)? The examples in the book weren't clear enough.
Thanks in advance.