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



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

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.



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

def base_uri
  @base_uri
end