Class: QAT::Reporter::Xray::Publisher::Base::Client

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

Overview

REST Base Client implementation

Defined Under Namespace

Classes: ConnectionError, NoConnectionFound, ServiceUnavailableError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_uri) ⇒ RestClient::Response

Returns a new REST Base Client



83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/qat/reporter/xray/publisher/base.rb', line 83

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.



79
80
81
# File 'lib/qat/reporter/xray/publisher/base.rb', line 79

def base_uri
  @base_uri
end