Class: XIVAPI::Page
- Inherits:
-
Object
- Object
- XIVAPI::Page
- Defined in:
- lib/xivapi/page.rb
Overview
A single page of results from XIVAPI
Instance Attribute Summary collapse
-
#next_page ⇒ Integer
readonly
The page number of the next results.
-
#results ⇒ Object
readonly
The results.
Instance Method Summary collapse
-
#initialize(response) ⇒ Page
constructor
Creates an object for storing a Page of results from XIVAPI.
Constructor Details
#initialize(response) ⇒ Page
Creates an object for storing a Page of results from XIVAPI
12 13 14 15 16 |
# File 'lib/xivapi/page.rb', line 12 def initialize(response) @results = response.results pagination = response.pagination @next_page = pagination.page_next unless pagination.page == pagination.page_total end |
Instance Attribute Details
#next_page ⇒ Integer (readonly)
Returns the page number of the next results
8 9 10 |
# File 'lib/xivapi/page.rb', line 8 def next_page @next_page end |
#results ⇒ Object (readonly)
Returns the results
5 6 7 |
# File 'lib/xivapi/page.rb', line 5 def results @results end |