Module: Tins::ParameterizedModule
- Included in:
- Module, FromModule
- Defined in:
- lib/tins/dslkit.rb
Overview
A module that provides parameterization capabilities for other modules.
This module enables dynamic configuration of modules through a common interface, allowing for flexible composition and customization of module behavior at runtime.
Instance Method Summary collapse
-
#parameterize_for(*args) {|block| ... } ⇒ Module
Configures the module using the provided arguments and optional block.
Instance Method Details
#parameterize_for(*args) {|block| ... } ⇒ Module
Configures the module using the provided arguments and optional block.
This method checks if the including module responds to parameterize and calls it with the given arguments. If no parameterize method exists, it returns the module itself unchanged.
862 863 864 |
# File 'lib/tins/dslkit.rb', line 862 def parameterize_for(*args, &block) respond_to?(:parameterize) ? parameterize(*args, &block) : self end |