Ruby/Zmienne lokalne: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
Szymon wro (dyskusja | edycje)
Nowa strona: A local variable has a name starting with a lower case letter or an underscore character (_). Local variables do not, like globals and instance variables, have the value nil before init...
 
Kj (dyskusja | edycje)
m nav
Linia 77:
 
This kind of programming could be considered a perverse little object-oriented framework. The box method acts something like a class, with get and set serving as methods (except those aren't really the method names, which could vary with each box instance) and contents being the lone instance variable. Of course, using ruby's legitimate class framework leads to much more readable code.
<noinclude>
{{ProstaNawigacja|spis=Ruby|poprzart=Ruby/Zmienne instancji|poprz=Zmienne instancji|nastart=Ruby/Stałe klasowe|nast=Stałe klasowe}}
</noinclude>