I want to have an array as a instance variable using attr_accessor.
attr_accessor
But isn\'t attr_accessor only for strings?
How do I use it on an ar
It works for me:
class Foo attr_accessor :arr def initialize() @arr = [1,2,3] end end f = Foo.new p f.arr
Returns the following
$ ruby /tmp/t.rb [1, 2, 3] $