Class: RgGen::InputBase::ComponentFactory

Inherits:
Base::ComponentFactory show all
Defined in:
lib/rggen/input_base/component_factory.rb

Instance Attribute Summary collapse

Attributes inherited from Base::ComponentFactory

#child_factory, #item_factories, #target_component

Instance Method Summary collapse

Methods inherited from Base::ComponentFactory

#initialize, #root_factory

Constructor Details

This class inherits a constructor from RgGen::Base::ComponentFactory

Instance Attribute Details

#loaders=(value) ⇒ Object (writeonly)

Sets the attribute loaders

Parameters:

  • value

    the value to set the attribute loaders to.



4
5
6
# File 'lib/rggen/input_base/component_factory.rb', line 4

def loaders=(value)
  @loaders = value
end

Instance Method Details

#create(*args) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/rggen/input_base/component_factory.rb', line 6

def create(*args)
  if @root_factory
    file    = args.pop
    source  = load(file)
    args    << source

    component = super(*args)
    component.validate
  else
    component = super(*args)
  end
  component
end