| February 2, 2004 | Intro to Ruby | Slide #24 |
| Prev | Next |
Ruby has three levels of access for methods:
Public Methods can be called by anyone. Methods are public by default, except for initialize, which is always private.
Protected Methods can only be invoked by members of the defining class and its subclasses
Private Methods can only be called by the defining class and direct descendents within the same object.
|
| Prev | Copyright © 2004 Walter C. Mankowski | Next |