def rank=(value)
      r = value.to_s.downcase.strip
      if !RANKS.include?(r) 
        raise NameError, "#{r} is not a valid rank."
      end
      @rank = r
    end
def rank=(value)
      r = value.to_s.downcase.strip
      if !RANKS.include?(r) 
        raise NameError, "#{r} is not a valid rank."
      end
      @rank = r
    end
Set the rank.