Class: Traver::ListCreator
- Inherits:
-
Object
- Object
- Traver::ListCreator
- Defined in:
- lib/traver/list_creator.rb
Instance Attribute Summary collapse
-
#factories_store ⇒ Object
readonly
Returns the value of attribute factories_store.
-
#factory_name ⇒ Object
readonly
Returns the value of attribute factory_name.
-
#list ⇒ Object
readonly
Returns the value of attribute list.
-
#num ⇒ Object
readonly
Returns the value of attribute num.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#sequencer ⇒ Object
readonly
Returns the value of attribute sequencer.
Instance Method Summary collapse
- #create_list ⇒ Object
-
#initialize(num, factory_name, params, factories_store, sequencer) ⇒ ListCreator
constructor
A new instance of ListCreator.
Constructor Details
#initialize(num, factory_name, params, factories_store, sequencer) ⇒ ListCreator
Returns a new instance of ListCreator.
6 7 8 9 10 11 12 |
# File 'lib/traver/list_creator.rb', line 6 def initialize(num, factory_name, params, factories_store, sequencer) @num = num @factory_name = factory_name @params = params @factories_store = factories_store @sequencer = sequencer end |
Instance Attribute Details
#factories_store ⇒ Object (readonly)
Returns the value of attribute factories_store.
3 4 5 |
# File 'lib/traver/list_creator.rb', line 3 def factories_store @factories_store end |
#factory_name ⇒ Object (readonly)
Returns the value of attribute factory_name.
3 4 5 |
# File 'lib/traver/list_creator.rb', line 3 def factory_name @factory_name end |
#list ⇒ Object (readonly)
Returns the value of attribute list.
4 5 6 |
# File 'lib/traver/list_creator.rb', line 4 def list @list end |
#num ⇒ Object (readonly)
Returns the value of attribute num.
3 4 5 |
# File 'lib/traver/list_creator.rb', line 3 def num @num end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
3 4 5 |
# File 'lib/traver/list_creator.rb', line 3 def params @params end |
#sequencer ⇒ Object (readonly)
Returns the value of attribute sequencer.
3 4 5 |
# File 'lib/traver/list_creator.rb', line 3 def sequencer @sequencer end |
Instance Method Details
#create_list ⇒ Object
14 15 16 17 18 |
# File 'lib/traver/list_creator.rb', line 14 def create_list @list = num.times.map do object_creator.create_object(factory_name, params, factories_store, sequencer) end end |