<commit_before>module Cb
  module Models
    class CollapsedJobs < ApiResponseModel
      attr_accessor :jobs_in_group, :jobs

      def initialize(args={})
        super(args)
      end

      protected

      def required_fields
        []
      end

      def set_model_properties
        args = api_response

        @jobs_in_group = args['NumberJobsInGroup']
        @jobs = get_jobs(args['GroupedSearchResults'])
      end

      def get_jobs(jobs_hash)
        jobs_hash.collect do |job|
          Job.new(job)
        end
      end
    end
  end<commit_msg>adding some getters<commit_after>module Cb
  module Models
    class CollapsedJobs < ApiResponseModel
      attr_accessor :jobs_in_group, :jobs

      def initialize(args={})
        super(args)
      end

      def job_count
        @jobs_in_group
      end

      def all_jobs
        @jobs
      end

      protected

      def required_fields
        []
      end

      def set_model_properties
        args = api_response

        @jobs_in_group = args['NumberJobsInGroup']
        @jobs = get_jobs(args['GroupedSearchResults'])
      end

      def get_jobs(jobs_hash)
        jobs_hash.collect do |job|
          Job.new(job)
        end
      end
    end
  end
{'fraction_non_alphanumeric': 0.06482982171799027, 'fraction_numerical': 0.0, 'mean_word_length': 1.8922716627634661, 'pattern_counts': {'":': 0, '<': 5, '<?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': '126757', 'n_tokens_mistral': 399, 'n_tokens_neox': 367, 'n_words': 83}