class Harvesting::Models::ProjectUserAssignments

Public Class Methods

new(attrs, query_opts = {}, opts = {}) click to toggle source
# File lib/harvesting/models/project_user_assignments.rb, line 5
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

Public Instance Methods

fetch_next_page() click to toggle source
# File lib/harvesting/models/project_user_assignments.rb, line 12
def fetch_next_page
  @entries += harvest_client.user_assignments(next_page_query_opts).entries
  @attributes['page'] = page + 1
end