Better encapsulation for Ruby instance variables