Class: Trav3::Pagination

Inherits:
Object
  • Object
show all
Defined in:
lib/trav3/pagination.rb

Instance Method Summary collapse

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

#firstSuccess, RequestError

First page of results

Returns:



19
20
21
# File 'lib/trav3/pagination.rb', line 19

def first
  get(action(:first))
end

#lastSuccess, RequestError

Last page of results

Returns:



25
26
27
# File 'lib/trav3/pagination.rb', line 25

def last
  get(action(:last))
end

#nextSuccess, RequestError

Next page of results

Returns:



13
14
15
# File 'lib/trav3/pagination.rb', line 13

def next
  get(action(:next))
end