<commit_before>module WeixinRails
  class Paramers
    URL_TYPES = %w(type content from_user to_user event)
    URL_TYPES.each do |t|
      attr_reader t.to_sym
    end
    attr_reader :created_at, :msg_id
    # attr_reader :type, :content, :from
    def initialize(params, &block)
      pms = params[:xml] #|| params
      if pms 
        pms.to_options!
        @type        = pms[:MsgType]
        @content     = pms[:Content]
        @from_user   = pms[:FromUser] || pms[:FromUserName]
        @to_user     = pms[:ToUser]   || pms[:FromUserName]
        @event       = pms[:Event]
        @created_at  = pms[:CreateTime]
        @msg_id      = pms[:MsgId]
      end
    end
  end
end<commit_msg>fixed:添加 ToUser ToUserName 参数<commit_after>module WeixinRails
  class Paramers
    URL_TYPES = %w(type content from_user to_user event)
    URL_TYPES.each do |t|
      attr_reader t.to_sym
    end
    attr_reader :created_at, :msg_id
    # attr_reader :type, :content, :from
    def initialize(params, &block)
      pms = params[:xml] #|| params
      if pms 
        pms.to_options!
        @type        = pms[:MsgType]
        @content     = pms[:Content]
        @from_user   = pms[:FromUser] || pms[:FromUserName]
        @to_user     = pms[:ToUser]   || pms[:ToUserName]
        @event       = pms[:Event]
        @created_at  = pms[:CreateTime]
        @msg_id      = pms[:MsgId]
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.11118980169971672, 'fraction_numerical': 0.0, 'mean_word_length': 2.1968325791855206, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4534594', 'n_tokens_mistral': 506, 'n_tokens_neox': 508, 'n_words': 106}