Sha256: c0b4644c577f664b39f03ffb05d56304004a6236f436a583b665e183be619713

Contents?: true

Size: 483 Bytes

Versions: 9

Compression:

Stored size: 483 Bytes

Contents

# frozen_string_literal: true

module Nonnative
  class SocketPairFactory
    class << self
      def create(type, proxy, logger)
        pair = case type
               when :close_all
                 CloseAllSocketPair
               when :delay
                 DelaySocketPair
               when :invalid_data
                 InvalidDataSocketPair
               else
                 SocketPair
               end

        pair.new(proxy, logger)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
nonnative-1.37.0 lib/nonnative/socket_pair_factory.rb
nonnative-1.36.0 lib/nonnative/socket_pair_factory.rb
nonnative-1.34.0 lib/nonnative/socket_pair_factory.rb
nonnative-1.31.0 lib/nonnative/socket_pair_factory.rb
nonnative-1.30.0 lib/nonnative/socket_pair_factory.rb
nonnative-1.29.0 lib/nonnative/socket_pair_factory.rb
nonnative-1.28.0 lib/nonnative/socket_pair_factory.rb
nonnative-1.27.0 lib/nonnative/socket_pair_factory.rb
nonnative-1.26.0 lib/nonnative/socket_pair_factory.rb