Class: RSpec::Parallel::SocketBuilder
- Inherits:
-
Object
- Object
- RSpec::Parallel::SocketBuilder
- Defined in:
- lib/rspec/parallel/socket_builder.rb
Instance Method Summary collapse
-
#initialize(path) ⇒ SocketBuilder
constructor
A new instance of SocketBuilder.
- #run(retry_counter = 3) ⇒ BasicSocket?
Constructor Details
#initialize(path) ⇒ SocketBuilder
Returns a new instance of SocketBuilder.
6 7 8 |
# File 'lib/rspec/parallel/socket_builder.rb', line 6 def initialize(path) @path = path end |
Instance Method Details
#run(retry_counter = 3) ⇒ BasicSocket?
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rspec/parallel/socket_builder.rb', line 11 def run(retry_counter = 3) build rescue retry_counter -= 1 if retry_counter > 0 sleep rand retry end nil end |