module WebSocket::Client::Simple
Public Class Methods
connect(url, options = {}) { |fake_client| ... }
click to toggle source
# File lib/simple_websocket_vcr/monkey_patch.rb, line 5 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
Also aliased as: real_connect