M
mario
I have this code:
----------------------
require 'appliances'
class Toast<Appliances
def toast(hole,size,seconds,quantity)
self.turn_on(seconds,quantity)
self.chooser(hole,size)
end
end
----------------------
And from another file:
---------------------
require 'toast'
tuest1=::toast.new('white','big') # from Appliances
tuest1.buy('Bread','10') # from Appliances
tuest1.toast('1','200','120','2')
-----------------
Now I want to create a new variable that automatically has the same
values ('1','200','120','2' in this case) than the variable tuest1 in
tostar:
tuest2.toast=tuest1.toast
But it doesn't work.
Anybody knows how can I do it?
Thank you.
----------------------
require 'appliances'
class Toast<Appliances
def toast(hole,size,seconds,quantity)
self.turn_on(seconds,quantity)
self.chooser(hole,size)
end
end
----------------------
And from another file:
---------------------
require 'toast'
tuest1=::toast.new('white','big') # from Appliances
tuest1.buy('Bread','10') # from Appliances
tuest1.toast('1','200','120','2')
-----------------
Now I want to create a new variable that automatically has the same
values ('1','200','120','2' in this case) than the variable tuest1 in
tostar:
tuest2.toast=tuest1.toast
But it doesn't work.
Anybody knows how can I do it?
Thank you.