<commit_before>WeixinRailsMiddleware::WeixinController.class_eval do

  # There are two instance: @weixin_message,
  # @weixin_public_account(token_model instance if you setup, otherwise return nil)
  def reply
    render xml: send("response_#{@weixin_message.MsgType}_message", {})
  end

  private

    def response_text_message(options={})

    end

    def response_location_message(options={})
      # location message handler
    end

    def response_image_message(options={})
      # image message handler
    end

    def response_link_message(options={})<commit_msg>added example for weixin_controller generator<commit_after>WeixinRailsMiddleware::WeixinController.class_eval do

  # There are two instance: @weixin_message,
  # @weixin_public_account(token_model instance if you setup, otherwise return nil)
  def reply
    render xml: send("response_#{@weixin_message.MsgType}_message", {})
  end

  private

    def response_text_message(options={})
      reply_text_message("Your Message: #{@weixin_message.Content}")

    end

    def response_location_message(options={})
      reply_text_message("Your Location: #{@weixin_message.Location_X}, #{@weixin_message.Location_Y}")
    end

    def response_image_message(options={})
      # image message handler
    end

    def response_link_message(options={})
{'fraction_non_alphanumeric': 0.09441087613293052, 'fraction_numerical': 0.0, 'mean_word_length': 4.786026200873362, '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': '5927377', 'n_tokens_mistral': 403, 'n_tokens_neox': 396, 'n_words': 85}