Class: ClickSession::WebRunnerProcessor
- Inherits:
-
Object
- Object
- ClickSession::WebRunnerProcessor
- Defined in:
- lib/click_session/web_runner_processor.rb
Instance Method Summary collapse
-
#initialize(web_runner) ⇒ WebRunnerProcessor
constructor
A new instance of WebRunnerProcessor.
- #process(model) ⇒ Object
Constructor Details
#initialize(web_runner) ⇒ WebRunnerProcessor
Returns a new instance of WebRunnerProcessor.
5 6 7 8 9 |
# File 'lib/click_session/web_runner_processor.rb', line 5 def initialize(web_runner) @web_runner = web_runner @retries_made = 0 @making_requests = true end |
Instance Method Details
#process(model) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/click_session/web_runner_processor.rb', line 13 def process(model) while can_make_requests? begin run_steps_in_browser_with(model) rescue StandardError => e make_note_of_error(e) if too_many_retries? raise TooManyRetriesError.new end end end model end |