Class: Aker::Configuration::Slice
- Inherits:
-
Object
- Object
- Aker::Configuration::Slice
- Defined in:
- lib/aker/configuration.rb
Overview
A persistent, reappliable fragment of a Aker::Configuration. This class enables Aker extensions to provide default chunks of configuration that will apply to every newly-created configuration instance.
In general this facility is not needed by applications that use Aker; it’s intended only for libraries that provide additional functionality on top of Aker and need to provide reasonable defaults and/or mandatory infrastructure for those features.
Extensions of that kind should create an instance of this class and register it with add_default_slice (or pass a block to that method to have it create one on their behalf).
Most of Aker’s own functionality (including all authorities and modes) are registered using slices internally. If you are considering writing one, take a look at Aker’s source for examples.
Direct Known Subclasses
Authorities::Slice, Aker::Cas::Slice, Form::Slice, Ldap::Slice, Modes::Slice, Rack::Slice
Instance Attribute Summary collapse
-
#contents ⇒ Proc
The configuration DSL fragment comprising this slice.
Instance Method Summary collapse
-
#initialize(&contents) ⇒ Slice
constructor
A new instance of Slice.
Constructor Details
#initialize(&contents) ⇒ Slice
Returns a new instance of Slice.
447 448 449 |
# File 'lib/aker/configuration.rb', line 447 def initialize(&contents) @contents = contents end |
Instance Attribute Details
#contents ⇒ Proc
Returns the configuration DSL fragment comprising this slice.
442 443 444 |
# File 'lib/aker/configuration.rb', line 442 def contents @contents end |