Ruby/Zmienne instancji: Różnice pomiędzy wersjami
Usunięta treść Dodana treść
Szymon wro (dyskusja | edycje) Nie podano opisu zmian |
Szymon wro (dyskusja | edycje) mNie podano opisu zmian |
||
Linia 7:
<pre>
ruby> class InstTest
| def
| @
| end
| def
| @
| end
| end
Linia 17:
ruby> i = InstTest.new
#<InstTest:0x83678>
ruby> i.
2
ruby> i
#<InstTest:0x83678 @
ruby> i.
4
ruby> i
#<InstTest:0x83678 @
</pre>
Zauważ, że powyższe <tt>i</tt> nie zwraca wartości <tt>@
<noinclude>
{{ProstaNawigacja|spis=Ruby|poprzart=Ruby/Zmienne globalne|poprz=Zmienne globalne|nastart=Ruby/Zmienne lokalne|nast=Zmienne lokalne}}
|