Module: Wildsight::Transport
- Defined in:
- lib/wildsight/transport/faraday.rb,
lib/wildsight/transport/net_http.rb,
lib/wildsight/transport/transport.rb
Defined Under Namespace
Classes: FaradayTransport, NetHttpTransport
Class Method Summary collapse
Class Method Details
.detect ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/wildsight/transport/transport.rb', line 6 def self.detect return @transport if @transport begin require 'faraday' require 'wildsight/transport/faraday' return @transport = Wildsight::Transport::FaradayTransport rescue => e end require 'wildsight/transport/net_http' return @transport = Wildsight::Transport::NetHttpTransport end |