Class: Playwright::RouteHandler::CountDown
- Inherits:
-
Object
- Object
- Playwright::RouteHandler::CountDown
- Defined in:
- lib/playwright/route_handler.rb
Instance Method Summary collapse
- #handle ⇒ Object
-
#initialize(count) ⇒ CountDown
constructor
A new instance of CountDown.
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
#handle ⇒ Object
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 |