From: Robert Klemme Date: 2012-04-11T22:27:25+09:00 Subject: Re: New to Ruby, tutorial gives wrong example. Roger McDonald wrote in post #1055979: > Wow, thank you all for replying, it is really appreciated. You're welcome! > A question if I may please, and I am not sure I'm using the right > terminology here: > With the example above from karatedog, where a Class is created with > variables in a certain order, does that order and number of variables > have to be retained where ever the class is called, or, could one or You do not "call" classes, you only call (or "invoke") methods. > more variables be referenced say only the y, x,. > this is interesting, I must go and experiment > thank you all. The order in which you invoke setters (methods which end in "=") is completely at your own discretion. Btw. if you are lazy and only need a data container you can also use OpenStruct: irb(main):005:0> require 'ostruct' => true irb(main):006:0> o=OpenStruct.new(a:100) => # irb(main):007:0> o.a => 100 irb(main):008:0> o.b=77 => 77 irb(main):009:0> o => # Kind regards robert -- Posted via http://www.ruby-forum.com/.