1 2 3 4 5 6 7 8 9
class A attr_accessor :a def initialize(a) @a = a end end aa = A.new("hello, world!") puts aa.a
1
hello, world!