class RSpec::Parallel::SocketBuilder
Attributes
path[R]
@return [String]
Public Class Methods
new(path)
click to toggle source
# File lib/rspec/parallel/socket_builder.rb, line 6 def initialize(path) @path = path end
Public Instance Methods
run(retry_counter = 3)
click to toggle source
@return [BasicSocket, nil]
# 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
Private Instance Methods
build()
click to toggle source
@return [UNIXSocket]
# File lib/rspec/parallel/socket_builder.rb, line 25 def build ::UNIXSocket.new(path) end