def to_hash
      hash = {}
      @messages.each_pair do |key, value|
        hash[key] = if value.size == 1
          value.first
        else
          value.to_a
        end
      end
      hash
    end
def to_hash
      hash = {}
      @messages.each_pair do |key, value|
        hash[key] = if value.size == 1
          value.first
        else
          value.to_a
        end
      end
      hash
    end
Public: Returns the added attributes and their messages as a Hash, keyed
 by the attribute, with either an Array containing all of the added
 messages or just the single attribute message.

 Examples

     list.add(:time, 'is now')
     list.add(:time, 'is valuable')
     list.add(:day, 'is today')
     list.full_messages
     # => {:time => ["is now", "is valuable"], :day => "is today"}

 Returns a Hash instance.