How can I declare moveto method if I want to change co-ordinates (x,y)
that are actually in object. That's my code:


module Domieszka
   attr_accessor :@x
   attr_accessor :@y

   def inspect
       "You are in: #{@x} #{@y}"
   end

   def moveto(x,y)

   end
end


For example if I wrote i=sthClass.new
i.x = 4
i.y = 5
I have (4,5) object, and how to change x and y in object?

-- 
Posted via http://www.ruby-forum.com/.