Class: Portage::Ucp::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/portage/ucp/configuration.rb

Overview

Global defaults, set once via Portage::Ucp.configure { |c| ... }. Nothing requires this — every collaborator can still be passed explicitly to Mcp::Server.build/Manifest.new — but it's the one place a consumer wires up their authenticator/rate limiter/logger without threading them through every call site.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



14
15
16
17
18
19
20
21
22
# File 'lib/portage/ucp/configuration.rb', line 14

def initialize
  @registry = CapabilityRegistry.default
  @authenticator = UnconfiguredAuthenticator.new
  @rate_limiter = NullRateLimiter.new
  @logger = Logger.new($stdout)
  @payment_handlers = []
  @signing_keys = []
  @services = []
end

Instance Attribute Details

#authenticatorObject

Returns the value of attribute authenticator.



11
12
13
# File 'lib/portage/ucp/configuration.rb', line 11

def authenticator
  @authenticator
end

#businessObject

Returns the value of attribute business.



11
12
13
# File 'lib/portage/ucp/configuration.rb', line 11

def business
  @business
end

#loggerObject

Returns the value of attribute logger.



11
12
13
# File 'lib/portage/ucp/configuration.rb', line 11

def logger
  @logger
end

#payment_handlersObject

Returns the value of attribute payment_handlers.



11
12
13
# File 'lib/portage/ucp/configuration.rb', line 11

def payment_handlers
  @payment_handlers
end

#rate_limiterObject

Returns the value of attribute rate_limiter.



11
12
13
# File 'lib/portage/ucp/configuration.rb', line 11

def rate_limiter
  @rate_limiter
end

#registryObject

Returns the value of attribute registry.



11
12
13
# File 'lib/portage/ucp/configuration.rb', line 11

def registry
  @registry
end

#servicesObject

Returns the value of attribute services.



11
12
13
# File 'lib/portage/ucp/configuration.rb', line 11

def services
  @services
end

#signerObject

Returns the value of attribute signer.



11
12
13
# File 'lib/portage/ucp/configuration.rb', line 11

def signer
  @signer
end

#signing_keysObject

Returns the value of attribute signing_keys.



11
12
13
# File 'lib/portage/ucp/configuration.rb', line 11

def signing_keys
  @signing_keys
end