Реклама

Ruby – access control

Earlier, we said that ruby has no functions, only methods. However there is more than one kind of method. In this chapter we introduce access controls. Consider what happens when we define a method in the “top level”, not inside a class definition. We can think of such a method as analogous to a function…