Sha256: b53731b95f269741065ba35155a159fb771fbd7df79702c25ccf9ba07a0538a8

Contents?: true

Size: 570 Bytes

Versions: 4

Compression:

Stored size: 570 Bytes

Contents

module Harvesting
  module Models
    class ProjectUserAssignments < HarvestRecordCollection

      def initialize(attrs, query_opts = {}, opts = {})
        super(attrs.reject {|k,v| k == "user_assignments" }, query_opts, opts)
        @entries = attrs["user_assignments"].map do |entry|
          ProjectUserAssignment.new(entry, harvest_client: opts[:harvest_client])
        end
      end

      def fetch_next_page
        @entries += harvest_client.user_assignments(next_page_query_opts).entries
        @attributes['page'] = page + 1
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
harvesting-0.6.0 lib/harvesting/models/project_user_assignments.rb
harvesting-0.5.1 lib/harvesting/models/project_user_assignments.rb
harvesting-0.5.0 lib/harvesting/models/project_user_assignments.rb
harvesting-0.4.0 lib/harvesting/models/project_user_assignments.rb