<commit_before>require 'hipchat'

class HipchatSearcher
  class Message
    def initialize(token, options={})
      @token   = token
      @options = options
      @client  = ::HipChat::Client.new(@token, api_version: 'v2')
    end

    def get_history(room)
      @client[room].history(@options)
    end

    def histroy(room)
      h = get_history(room)
      result = Result.new(h)
      result.messages
    end
  end
end
<commit_msg>* Return "Result" object in #history<commit_after>require 'hipchat'

class HipchatSearcher
  class Message
    def initialize(token, options={})
      @token   = token
      @options = options
      @client  = ::HipChat::Client.new(@token, api_version: 'v2')
    end

    def get_history(room)
      @client[room].history(@options)
    end

    def histroy(room)
      h = get_history(room)
      Result.new(h).tap {|r| r.room = room }
    end
  end
end

{'fraction_non_alphanumeric': 0.11784511784511785, 'fraction_numerical': 0.002244668911335578, 'mean_word_length': 2.7637130801687766, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '2990693', 'n_tokens_mistral': 300, 'n_tokens_neox': 294, 'n_words': 70}