Method: Finix::Pagination#fetch

Defined in:
lib/finix/pagination.rb

#fetch(scope) ⇒ Object

:next, :last, :first, :prev, :self

Raises:

  • (StopIteration)


34
35
36
37
38
39
40
41
42
# File 'lib/finix/pagination.rb', line 34

def fetch(scope) # :next, :last, :first, :prev, :self
  scope = scope.to_s.to_sym
  if @hyperlinks[scope]
    load_from @hyperlinks[scope]
    return self.items
  end

  raise StopIteration
end