why not just
attr_accessor :data
?