class Databasedotcom::Collection
A collection of Sobject
or Record objects that holds a single page of results, and understands how to retrieve the next page, if any. Inherits from Array, thus, behaves as an Enumerable.
Attributes
client[R]
current_page_url[R]
next_page_url[R]
previous_page_url[R]
total_size[R]
Public Instance Methods
next_page()
click to toggle source
Retrieve the next page of this collection. Returns the new collection, which is an empty collection if no next page exists
# File lib/databasedotcom/collection.rb, line 23 def next_page self.next_page? ? @client.next_page(@next_page_url) : Databasedotcom::Collection.new(self.client, 0) end
next_page?()
click to toggle source
Does this collection have a next page?
# File lib/databasedotcom/collection.rb, line 18 def next_page? !!self.next_page_url end
previous_page()
click to toggle source
Retrieve the previous page of this collection. Returns the new collection, which is an empty collection if no previous page exists
# File lib/databasedotcom/collection.rb, line 33 def previous_page self.previous_page? ? @client.previous_page(@previous_page_url) : Databasedotcom::Collection.new(self.client, 0) end
previous_page?()
click to toggle source
Does this collection have a previous page?
# File lib/databasedotcom/collection.rb, line 28 def previous_page? !!self.previous_page_url end