class AWS::Core::PageResult
def initialize collection, items, per_page, next_token
-
next_token
(String
) -- (nil) A token that can be passed to the -
per_page
(Integer
) -- The number of requested items for this -
items
(Array
) -- An array of result items that represent a -
collection
(Collection
) -- The collection that was used to
def initialize collection, items, per_page, next_token @collection = collection @per_page = per_page @next_token = next_token super(items) end
def last_page?
-
(Boolean)
- Returns true if this is the last page of results.
def last_page? next_token.nil? end
def more?
-
(Boolean)
- Returns true if there are more pages of results.
def more? !!next_token end
def next_page
def next_page if last_page? raise 'unable to get the next page, already at the last page' end collection.page(:per_page => per_page, :next_token => next_token) end