Class: Trav3::Pagination
- Inherits:
-
Object
- Object
- Trav3::Pagination
- Defined in:
- lib/trav3/pagination.rb
Instance Method Summary collapse
-
#first ⇒ Success, RequestError
First page of results.
-
#initialize(travis, result) ⇒ Pagination
constructor
A new instance of Pagination.
-
#last ⇒ Success, RequestError
Last page of results.
-
#next ⇒ Success, RequestError
Next page of results.
Constructor Details
#initialize(travis, result) ⇒ Pagination
Returns a new instance of Pagination
6 7 8 9 |
# File 'lib/trav3/pagination.rb', line 6 def initialize(travis, result) @travis = travis @result = result end |
Instance Method Details
#first ⇒ Success, RequestError
First page of results
19 20 21 |
# File 'lib/trav3/pagination.rb', line 19 def first get(action(:first)) end |
#last ⇒ Success, RequestError
Last page of results
25 26 27 |
# File 'lib/trav3/pagination.rb', line 25 def last get(action(:last)) end |
#next ⇒ Success, RequestError
Next page of results
13 14 15 |
# File 'lib/trav3/pagination.rb', line 13 def next get(action(:next)) end |