Class: Cert::RhsmClient

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_proxy_container_gateway/rhsm_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cert) ⇒ RhsmClient

Returns a new instance of RhsmClient.



8
9
10
# File 'lib/smart_proxy_container_gateway/rhsm_client.rb', line 8

def initialize(cert)
  self.cert = extract(cert)
end

Instance Attribute Details

#certObject

Returns the value of attribute cert.



6
7
8
# File 'lib/smart_proxy_container_gateway/rhsm_client.rb', line 6

def cert
  @cert
end

Instance Method Details

#uuidObject



12
13
14
# File 'lib/smart_proxy_container_gateway/rhsm_client.rb', line 12

def uuid
  @uuid ||= @cert.subject.to_a.find { |entry| entry[0] == 'CN' }&.[](1)
end