Class: PkiExpress::DiscoverServicesResult

Inherits:
Object
  • Object
show all
Defined in:
lib/pki_express/discovery_service_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ DiscoverServicesResult

Returns a new instance of DiscoverServicesResult.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/pki_express/discovery_service_result.rb', line 7

def initialize(model)
  @services = []
  @auth_parameters = []

  unless model.nil?
    services = model.fetch(:services)
    if services
      @services = services.map { |s| TrustServiceInfo.new(s) }
    end

    auth_parameters = model.fetch(:authParameters)
    if auth_parameters
      @auth_parameters = auth_parameters.map { |a| TrustServiceAuthParameters.new(a) }
    end

  end
end

Instance Attribute Details

#auth_parametersObject

Returns the value of attribute auth_parameters.



5
6
7
# File 'lib/pki_express/discovery_service_result.rb', line 5

def auth_parameters
  @auth_parameters
end

#servicesObject

Returns the value of attribute services.



5
6
7
# File 'lib/pki_express/discovery_service_result.rb', line 5

def services
  @services
end