Class: RgGen::RegisterMap::RegisterFactory
- Inherits:
-
ComponentFactory
- Object
- Base::ComponentFactory
- InputBase::ComponentFactory
- ComponentFactory
- RgGen::RegisterMap::RegisterFactory
- Defined in:
- lib/rggen/core_components/register_map/register_factory.rb
Instance Attribute Summary
Attributes inherited from InputBase::ComponentFactory
Attributes inherited from Base::ComponentFactory
#child_factory, #item_factories, #target_component
Instance Method Summary collapse
- #create_active_items(register, rows) ⇒ Object
- #create_children(register, configuration, rows) ⇒ Object
Methods inherited from ComponentFactory
Methods inherited from InputBase::ComponentFactory
Methods inherited from Base::ComponentFactory
#create, #initialize, #root_factory
Constructor Details
This class inherits a constructor from RgGen::Base::ComponentFactory
Instance Method Details
#create_active_items(register, rows) ⇒ Object
4 5 6 7 8 |
# File 'lib/rggen/core_components/register_map/register_factory.rb', line 4 def create_active_items(register, rows) active_item_factories.each_value.with_index do |factory, index| create_item(factory, register, rows.first[index]) end end |
#create_children(register, configuration, rows) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/rggen/core_components/register_map/register_factory.rb', line 10 def create_children(register, configuration, rows) drop_size = active_item_factories.size rows.each do |row| create_child(register, configuration, row.drop(drop_size)) end end |