From: Paul Smith Date: 2008-07-03T18:54:49+09:00 Subject: Re: method for assigned value class A attr_Accessor :attr1 attr_Accessor :attr2 def initialize(x,y) @attr1=x @attr2=y end end p = A.new("x","y") Or is that not what you meant? On Thu, Jul 3, 2008 at 10:30 AM, Roc Ho wrote: > Hello, > > Like this: > class A > attr_accessor :attr1 > attr_accessor :attr2 > end > > A.attr1="x" > A.attr2="y" > > Is there any method to code like this : > > A = {"x", "y"} > > thanks. > > -- Paul Smith DCI Level 2 Judge, Bath FNM Organiser Upcoming events in Bath - nomadicfun.co.uk July 12th Eventide Prerelease (Standard) paul@pollyandpaul.co.uk