Robert Klemme
6/10/2008 2:57:00 PM
2008/6/10 Jed Kowalski <satanowicz@gmail.com>:
> and now, the last (i think) problem:
> the change(x) method doesn't want to work, can You tell me why?
>
> BTW can somebody check for other errors?
>
> class Drink
>
> attr_accessor :price,:ammount,:name,:bought
>
> def initialize (cen, ile, nn)
> $price=cen
> $ammount=ile
> $name=nn
> $bought=0
> end
This gives me the creeps: you are modifying global variables like
instance variables. That's definitively a don't do.
Regards
robert
--
use.inject do |as, often| as.you_can - without end