Method: BrmClient::Gateway::Http#initialize

Defined in:
lib/brm_client/gateway/http.rb

#initialize(opts) ⇒ Http

Returns a new instance of Http.



6
7
8
9
10
11
12
13
14
# File 'lib/brm_client/gateway/http.rb', line 6

def initialize opts
  host = opts[:host]
  port = opts[:port]
  path = opts[:path] || ""
  @endpoint = "http://#{host}:#{port}"
  @timeout = opts[:timeout] || 300
  @destination = opts[:queue] || opts[:application]
  @rest_client = RestClient::Resource.new(@endpoint, :timeout => @timeout)
end