Class: Harvesting::Models::HarvestRecordCollection
- Inherits:
-
Base
- Object
- Base
- Harvesting::Models::HarvestRecordCollection
show all
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/harvesting/models/harvest_record_collection.rb
Instance Attribute Summary collapse
Attributes inherited from Base
#attributes, #harvest_client
Instance Method Summary
collapse
Methods included from Enumerable
#each
Methods inherited from Base
#create, #delete, #fetch, get, #save, #to_hash, #update
Constructor Details
#initialize(attrs, query_opts = {}, opts = {}) ⇒ HarvestRecordCollection
19
20
21
22
23
|
# File 'lib/harvesting/models/harvest_record_collection.rb', line 19
def initialize(attrs, query_opts = {}, opts = {})
super(attrs, opts)
@query_opts = query_opts
@api_page = attrs
end
|
Instance Attribute Details
#entries ⇒ Object
Returns the value of attribute entries.
17
18
19
|
# File 'lib/harvesting/models/harvest_record_collection.rb', line 17
def entries
@entries
end
|
Instance Method Details
#fetch_next_page ⇒ Object
37
38
39
|
# File 'lib/harvesting/models/harvest_record_collection.rb', line 37
def fetch_next_page
raise NotImplementedError
end
|
#next_page_query_opts ⇒ Object
33
34
35
|
# File 'lib/harvesting/models/harvest_record_collection.rb', line 33
def next_page_query_opts
@query_opts.merge(page: page + 1)
end
|
#page ⇒ Object
25
26
27
|
# File 'lib/harvesting/models/harvest_record_collection.rb', line 25
def page
@attributes['page']
end
|
#size ⇒ Object
29
30
31
|
# File 'lib/harvesting/models/harvest_record_collection.rb', line 29
def size
total_entries
end
|