Class: StimulusPlumbers::Plumber::Config
- Inherits:
-
Object
- Object
- StimulusPlumbers::Plumber::Config
- Defined in:
- lib/stimulus_plumbers/plumber/config.rb
Overview
Sibling of Slots for block DSLs whose payload is configuration, not content. Slots captures blocks through the view; Config only stores values, and holds the template to pass on to renderers.
The store is private. Slots publishes resolve because its payload is uniform
content a renderer reads generically; a Config's settings are typed, so each
subclass exposes its own named readers instead.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(template = nil) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(template = nil) ⇒ Config
Returns a new instance of Config.
15 16 17 18 |
# File 'lib/stimulus_plumbers/plumber/config.rb', line 15 def initialize(template = nil) @template = template @config = {} end |
Instance Attribute Details
#template ⇒ Object (readonly)
Returns the value of attribute template.
13 14 15 |
# File 'lib/stimulus_plumbers/plumber/config.rb', line 13 def template @template end |