Reference documentation and code samples for the gapic-common class Gapic::Rest::PagedEnumerable::Page.
A class to represent a page in a PagedEnumerable. This also implements Enumerable, so it can iterate over the resource elements.
Inherits
- Object
Includes
- Enumerable
Methods
#each
def
each
()
-
>
Enumerator
Iterate over the resources.
- (Object) — Gives the resource objects in the page.
- (Enumerator) — if no block is provided
#next_page_token
def
next_page_token
()
-
>
String
The page token to be used for the next RPC call, or the empty string if there is no next page.
- (String)
#next_page_token?
def
next_page_token?
()
-
>
Boolean
Whether the next_page_token exists and is not empty
- (Boolean)
#resources
def
resources
()
-
>
Array
Resources in this page presented as an array.
When the iterable is a protobuf map, the .each |item|
gives just the keys
to iterate like a normal hash it should be converted to an array first
- (Array)
#response
def
response
()
-
>
Object
- (Object) — the response object for the page.