Sha256: 3ebee243ac2c9719dfcfbaf24a6126495cb7282a75efe5ed34377040ee71618a
Contents?: true
Size: 572 Bytes
Versions: 5
Compression:
Stored size: 572 Bytes
Contents
module WebSocket::Client::Simple class << self alias_method :real_connect, :connect def connect(url, options = {}) if WebSocketVCR.configuration.hook_uris.any? { |u| url.include?(u) } cassette = WebSocketVCR.cassette live = cassette.recording? real_client = real_connect(url, options) if live fake_client = WebSocketVCR::RecordableWebsocketClient.new(cassette, live ? real_client : nil) yield fake_client if block_given? fake_client else real_connect(url, options) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems