Class: Portage::Ucp::Configuration
- Inherits:
-
Object
- Object
- Portage::Ucp::Configuration
- 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
-
#authenticator ⇒ Object
Returns the value of attribute authenticator.
-
#business ⇒ Object
Returns the value of attribute business.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#payment_handlers ⇒ Object
Returns the value of attribute payment_handlers.
-
#rate_limiter ⇒ Object
Returns the value of attribute rate_limiter.
-
#registry ⇒ Object
Returns the value of attribute registry.
-
#services ⇒ Object
Returns the value of attribute services.
-
#signer ⇒ Object
Returns the value of attribute signer.
-
#signing_keys ⇒ Object
Returns the value of attribute signing_keys.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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
#authenticator ⇒ Object
Returns the value of attribute authenticator.
11 12 13 |
# File 'lib/portage/ucp/configuration.rb', line 11 def authenticator @authenticator end |
#business ⇒ Object
Returns the value of attribute business.
11 12 13 |
# File 'lib/portage/ucp/configuration.rb', line 11 def business @business end |
#logger ⇒ Object
Returns the value of attribute logger.
11 12 13 |
# File 'lib/portage/ucp/configuration.rb', line 11 def logger @logger end |
#payment_handlers ⇒ Object
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_limiter ⇒ Object
Returns the value of attribute rate_limiter.
11 12 13 |
# File 'lib/portage/ucp/configuration.rb', line 11 def rate_limiter @rate_limiter end |
#registry ⇒ Object
Returns the value of attribute registry.
11 12 13 |
# File 'lib/portage/ucp/configuration.rb', line 11 def registry @registry end |
#services ⇒ Object
Returns the value of attribute services.
11 12 13 |
# File 'lib/portage/ucp/configuration.rb', line 11 def services @services end |
#signer ⇒ Object
Returns the value of attribute signer.
11 12 13 |
# File 'lib/portage/ucp/configuration.rb', line 11 def signer @signer end |
#signing_keys ⇒ Object
Returns the value of attribute signing_keys.
11 12 13 |
# File 'lib/portage/ucp/configuration.rb', line 11 def signing_keys @signing_keys end |