Class: QAT::Reporter::Opentest::Publisher::Base::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/qat/reporter/opentest/publisher/base.rb

Overview

REST Base Client implementation

Defined Under Namespace

Classes: ConnectionError, NoConnectionFound, NoTestsFound, ServiceUnavailableError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_uri) ⇒ RestClient::Response

Returns a new REST Base Client



49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/qat/reporter/opentest/publisher/base.rb', line 49

def initialize(base_uri)
	# sets the ip:port/base_route
	@base_uri = case base_uri
								when Hash
									URI::HTTP.build(base_uri).to_s
								when URI::HTTP
									base_uri.to_s
								when String
									base_uri
								else
									raise ArgumentError.new "Invalid URI class: #{base_uri.class}"
							end
end

Instance Attribute Details

#base_uriObject (readonly)

Returns the value of attribute base_uri.



45
46
47
# File 'lib/qat/reporter/opentest/publisher/base.rb', line 45

def base_uri
  @base_uri
end