Class: CombinationCreator

Inherits:
AbstractorCreator show all
Defined in:
lib/factory/test/combination/concrete_creators/combination_creator.rb

Instance Method Summary collapse

Methods inherited from AbstractorCreator

#export, #initialize, #read_csv, #write_csv

Constructor Details

This class inherits a constructor from AbstractorCreator

Instance Method Details

#createObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/factory/test/combination/concrete_creators/combination_creator.rb', line 4

def create
  arr = []
  i = 0
  @csv_rows.each do |row|
    if i == 0
      i = 1
      next
    end
    arr << row 
    i += 1
  end

  @output = @csv_rows.first.product(*arr)
end