module SalesforceBulk
  class QueryResultCollection < Array
    
    attr_reader :client
    attr_reader :batchId
    attr_reader :jobId
    attr_reader :totalSize
    attr_reader :resultId
    attr_reader :previousResultId
    attr_reader :nextResultId
    
    def initialize(client, jobId, batchId, totalSize=0, resultId=nil, previousResultId=nil, nextResultId=nil)
      @client = client
      @jobId = jobId
      @batchId = batchId
      @totalSize = totalSize
      @resultId = resultId
      @previousResultId = previousResultId
      @nextResultId = nextResultId
    end
    
    def next?
      @nextResultId.present?
    end
    
    def next
      # if calls method on client to fetch data and returns new collection instance
      SalesforceBulk::QueryResultCollection.new(self.client, self.jobId, self.batchId)
    end
    
    def previous?
      @previousResultId.present?
    end
    
    def previous
      # if has previous, calls method on client to fetch data and returns new collection instance
      SalesforceBulk::QueryResultCollection.new(self.client, self.jobId, self.batchId)
    end
    
  end
end
module SalesforceBulk
  class QueryResultCollection < Array
    
    attr_reader :client
    attr_reader :batch_id
    attr_reader :job_id
    attr_reader :total_size
    attr_reader :result_id
    attr_reader :previous_result_id
    attr_reader :next_result_id
    
    def initialize(client, job_id, batch_id, total_size=0, result_id=nil, previous_result_id=nil, next_result_id=nil)
      @client = client
      @job_id = job_id
      @batch_id = batch_id
      @total_size = total_size
      @result_id = result_id
      @previous_result_id = previous_result_id
      @next_result_id = next_result_id
    end
    
    def next?
      @next_result_id.present?
    end
    
    def next
      # if calls method on client to fetch data and returns new collection instance
      SalesforceBulk::QueryResultCollection.new(self.client, self.job_id, self.batch_id)
    end
    
    def previous?
      @previous_result_id.present?
    end
    
    def previous
      # if has previous, calls method on client to fetch data and returns new collection instance
      SalesforceBulk::QueryResultCollection.new(self.client, self.job_id, self.batch_id)
    end
    
  end
end
Update collection variable and method names to be underscore based and not camelCase. All tests passing.
Update collection variable and method names to be underscore based and not camelCase. All tests passing.
