Sha256: c564a9dedc3b6649523afd922fb4b054cd435d3107022ef79158fc9175feace3
Contents?: true
Size: 460 Bytes
Versions: 3
Compression:
Stored size: 460 Bytes
Contents
module Samuel module Loader extend self def apply_driver_patches loaded = { :net_http => defined?(Net::HTTP), :http_client => defined?(HTTPClient) } Net::HTTP.send(:include, DriverPatches::NetHTTP) if loaded[:net_http] HTTPClient.send(:include, DriverPatches::HTTPClient) if loaded[:http_client] if loaded.values.none? require 'net/http' apply_driver_patches end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
samuel-0.3.2 | lib/samuel/loader.rb |
samuel-0.3.1 | lib/samuel/loader.rb |
samuel-0.3.0 | lib/samuel/loader.rb |