Class: RgGen::Core::Builder::ComponentEntry
- Defined in:
- lib/rggen/core/builder/component_entry.rb
Defined Under Namespace
Classes: Entry
Instance Method Summary collapse
- #build_factory ⇒ Object
- #feature_registry ⇒ Object
-
#initialize(component_name, layer) ⇒ ComponentEntry
constructor
A new instance of ComponentEntry.
Constructor Details
#initialize(component_name, layer) ⇒ ComponentEntry
Returns a new instance of ComponentEntry.
9 10 11 12 |
# File 'lib/rggen/core/builder/component_entry.rb', line 9 def initialize(component_name, layer) @component_name = component_name @layer = layer end |
Instance Method Details
#build_factory ⇒ Object
25 26 27 28 29 30 |
# File 'lib/rggen/core/builder/component_entry.rb', line 25 def build_factory @component.factory.new(@component_name, @layer) do |f| f.target_component(@component.target) f.feature_factories(feature_registry&.build_factories) end end |
#feature_registry ⇒ Object
20 21 22 23 |
# File 'lib/rggen/core/builder/component_entry.rb', line 20 def feature_registry return unless @feature @feature_registry ||= FeatureRegistry.new(*@feature.values) end |