attr_accessor simple then define a function.