Class: CoPilot::Pager

Inherits:
Object
  • Object
show all
Defined in:
lib/copilot/requests/internal/pager.rb

Instance Method Summary collapse

Constructor Details

#initialize(browser) ⇒ Pager

Returns a new instance of Pager.



4
5
6
# File 'lib/copilot/requests/internal/pager.rb', line 4

def initialize(browser)
  @browser = browser
end

Instance Method Details

#next_pageObject



8
9
10
11
12
13
14
# File 'lib/copilot/requests/internal/pager.rb', line 8

def next_page
  link = next_page_link
  return false unless link
  link.click
  sleep 1
  true
end