class AsyncConnectionAdapter
Public Class Methods
call(uri, options)
click to toggle source
# File lib/resthome/httparty/async_connection_adapter.rb, line 60 def self.call(uri, options) if EM.reactor_running? self.new(uri, options).connection else HTTParty::ConnectionAdapter.call uri, options end end
new(uri, options)
click to toggle source
# File lib/resthome/httparty/async_connection_adapter.rb, line 48 def initialize(uri, options) @uri = uri @options = options end
Public Instance Methods
connection()
click to toggle source
# File lib/resthome/httparty/async_connection_adapter.rb, line 53 def connection AsyncHTTPConnection.new.tap do |c| c.connopts = HttpConnectionOptions.new(@uri, @options) c.uri = @uri end end