Class: Fog::Compute::DigitalOcean::PagingCollection

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/compute/digitalocean/models/paging_collection.rb

Direct Known Subclasses

Images, Servers, SshKeys, Volumes

Instance Method Summary collapse

Instance Method Details

#next_pageObject



9
10
11
# File 'lib/fog/compute/digitalocean/models/paging_collection.rb', line 9

def next_page
  all(page: @next) if @next != @last
end

#previous_pageObject



13
14
15
16
17
# File 'lib/fog/compute/digitalocean/models/paging_collection.rb', line 13

def previous_page
  if @next.to_i > 2
    all(page: @next.to_i - 2)
  end
end