Class: RabbitMQHttpAuthBackend::Resolver

Inherits:
Service
  • Object
show all
Defined in:
lib/rabbitmq_http_auth_backend/resolver.rb,
lib/rabbitmq_http_auth_backend/resolver/runtime.rb

Defined Under Namespace

Classes: Error, InvalidResponseError, NoResolverError, NonCallableResolverError, Runtime

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Service

call

Constructor Details

#initialize(params, resolver) ⇒ Resolver

Returns a new instance of Resolver.



13
14
15
16
# File 'lib/rabbitmq_http_auth_backend/resolver.rb', line 13

def initialize(params, resolver)
  @params = params
  @resolver = resolver || raise(NoResolverError)
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



10
11
12
# File 'lib/rabbitmq_http_auth_backend/resolver.rb', line 10

def params
  @params
end

#resolverObject (readonly)

Returns the value of attribute resolver.



11
12
13
# File 'lib/rabbitmq_http_auth_backend/resolver.rb', line 11

def resolver
  @resolver
end

Instance Method Details

#callObject



18
19
20
21
22
# File 'lib/rabbitmq_http_auth_backend/resolver.rb', line 18

def call
  response = generate_response!
  validate_response!(response)
  response
end