<commit_before>require 'intercom/user_resource'
require 'intercom/flat_store'
require 'intercom/social_profile'
require 'intercom/hashable_object'

module Intercom
  # A collection of your Users from Intercom
  # Uses the paginated users api under the covers (http://docs.intercom.io/api#getting_all_users)
  #
  # == Examples:
  #
  # Iterating over each user
  #    Intercom::User.all.each do |user|
  #      puts user.inspect
  #    end
  #
  class UserCollectionProxy
    include HashableObject

    QUERYABLE_ATTRIBUTES = [:tag_id, :tag_name]

    attr_accessor :query

    def initialize(attributes={})
      self.query = attributes.select{ |key, value| QUERYABLE_ATTRIBUTES.include?(key) }
    end

    # yields each {User} to the block provided
    # @return [void]
    def each(&block)
      page = 1
      fetch_another_page = true<commit_msg>Change to reject so that broke-ass ruby 1.8 works<commit_after>require 'intercom/user_resource'
require 'intercom/flat_store'
require 'intercom/social_profile'
require 'intercom/hashable_object'

module Intercom
  # A collection of your Users from Intercom
  # Uses the paginated users api under the covers (http://docs.intercom.io/api#getting_all_users)
  #
  # == Examples:
  #
  # Iterating over each user
  #    Intercom::User.all.each do |user|
  #      puts user.inspect
  #    end
  #
  class UserCollectionProxy
    include HashableObject

    QUERYABLE_ATTRIBUTES = [:tag_id, :tag_name]

    attr_accessor :query

    def initialize(attributes={})
      self.query = attributes.reject{ |key, value| !QUERYABLE_ATTRIBUTES.include?(key) }
    end

    # yields each {User} to the block provided
    # @return [void]
    def each(&block)
      page = 1
      fetch_another_page = true
{'fraction_non_alphanumeric': 0.09351692484222604, 'fraction_numerical': 0.002294893861158921, 'mean_word_length': 3.4832904884318765, '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': '4316507', 'n_tokens_mistral': 571, 'n_tokens_neox': 555, 'n_words': 145}