Class: Playwright::RouteHandler::CountDown

Inherits:
Object
  • Object
show all
Defined in:
lib/playwright/route_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(count) ⇒ CountDown

Returns a new instance of CountDown.



4
5
6
# File 'lib/playwright/route_handler.rb', line 4

def initialize(count)
  @count = count
end

Instance Method Details

#handleObject



8
9
10
11
12
13
# File 'lib/playwright/route_handler.rb', line 8

def handle
  return false if @count <= 0

  @count = @count - 1
  true
end