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
defeach()->Enumerator
Iterate over the resources.
Yields
(Object) — Gives the resource objects in the page.
Returns
(Enumerator) — if no block is provided
#next_page_token
defnext_page_token()->String
The page token to be used for the next RPC call, or the empty string if there is no next page.
Returns
(String)
#next_page_token?
defnext_page_token?()->Boolean
Whether the next_page_token exists and is not empty
Returns
(Boolean)
#resources
defresources()->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
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# gapic-common - Class Gapic::Rest::PagedEnumerable::Page (v1.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.1.0 (latest)](/ruby/docs/reference/gapic-common/latest/Gapic-Rest-PagedEnumerable-Page)\n- [1.0.1](/ruby/docs/reference/gapic-common/1.0.1/Gapic-Rest-PagedEnumerable-Page)\n- [0.26.0](/ruby/docs/reference/gapic-common/0.26.0/Gapic-Rest-PagedEnumerable-Page)\n- [0.25.0](/ruby/docs/reference/gapic-common/0.25.0/Gapic-Rest-PagedEnumerable-Page)\n- [0.24.0](/ruby/docs/reference/gapic-common/0.24.0/Gapic-Rest-PagedEnumerable-Page) \nReference documentation and code samples for the gapic-common class Gapic::Rest::PagedEnumerable::Page.\n\nA class to represent a page in a PagedEnumerable. This also implements Enumerable, so it can iterate over the\nresource elements. \n\nInherits\n--------\n\n- Object \n\nIncludes\n--------\n\n- Enumerable\n\nMethods\n-------\n\n### #each\n\n def each() -\u003e Enumerator\n\nIterate over the resources. \n**Yields**\n\n- (Object) --- Gives the resource objects in the page. \n**Returns**\n\n- (Enumerator) --- if no block is provided\n\n### #next_page_token\n\n def next_page_token() -\u003e String\n\nThe page token to be used for the next RPC call, or the empty string if there is no next page. \n**Returns**\n\n- (String)\n\n### #next_page_token?\n\n def next_page_token?() -\u003e Boolean\n\nWhether the next_page_token exists and is not empty \n**Returns**\n\n- (Boolean)\n\n### #resources\n\n def resources() -\u003e Array\n\nResources in this page presented as an array.\nWhen the iterable is a protobuf map, the `.each |item|` gives just the keys\nto iterate like a normal hash it should be converted to an array first \n**Returns**\n\n- (Array)\n\n### #response\n\n def response() -\u003e Object\n\n**Returns**\n\n- (Object) --- the response object for the page."]]