Sha256: 7257eb0871a3e9878a4f3934bbe50d342fb18873592152ad0ceaeb50f73f262c
Contents?: true
Size: 501 Bytes
Versions: 1
Compression:
Stored size: 501 Bytes
Contents
module Harvesting module Models class Projects < HarvestRecordCollection def initialize(attrs, query_opts = {}, opts = {}) super(attrs.reject {|k,v| k == "projects" }, query_opts, opts) @entries = attrs["projects"].map do |entry| Project.new(entry, client: opts[:client]) end end def fetch_next_page @entries += harvest_client.projects(next_page_query_opts).entries @attributes['page'] = page + 1 end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
harvesting-0.3.0 | lib/harvesting/models/projects.rb |