Class: ClickSession::WebRunnerProcessor
- Inherits:
-
Object
- Object
- ClickSession::WebRunnerProcessor
- Defined in:
- lib/click_session/web_runner_processor.rb
Instance Method Summary collapse
-
#initialize ⇒ WebRunnerProcessor
constructor
A new instance of WebRunnerProcessor.
- #process(model) ⇒ Object
- #stop_processing ⇒ Object
Constructor Details
#initialize ⇒ WebRunnerProcessor
Returns a new instance of WebRunnerProcessor.
5 6 7 8 |
# File 'lib/click_session/web_runner_processor.rb', line 5 def initialize @retries_made = 0 @making_requests = true end |
Instance Method Details
#process(model) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/click_session/web_runner_processor.rb', line 12 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 |
#stop_processing ⇒ Object
28 29 30 |
# File 'lib/click_session/web_runner_processor.rb', line 28 def stop_processing @making_requests = false end |