Class: AbstractorCreator

Inherits:
Object
  • Object
show all
Defined in:
lib/factory/test/combination/abstract_creator.rb

Direct Known Subclasses

CombinationCreator

Instance Method Summary collapse

Constructor Details

#initialize(input_file, output_file) ⇒ AbstractorCreator

Returns a new instance of AbstractorCreator.



6
7
8
9
# File 'lib/factory/test/combination/abstract_creator.rb', line 6

def initialize(input_file, output_file)
  @input_file = input_file
  @output_file = output_file
end

Instance Method Details

#createObject



23
24
# File 'lib/factory/test/combination/abstract_creator.rb', line 23

def create
end

#exportObject



11
12
13
14
15
16
17
# File 'lib/factory/test/combination/abstract_creator.rb', line 11

def export
  read_csv

  create

  write_csv
end

#read_csvObject



19
20
21
# File 'lib/factory/test/combination/abstract_creator.rb', line 19

def read_csv
  @csv_rows = CSV.read(@input_file)
end

#write_csvObject



26
27
28
29
30
31
32
# File 'lib/factory/test/combination/abstract_creator.rb', line 26

def write_csv
  CSV.open(@output_file,'w') do |test|
    @output.each do |a|
      test << a
    end
  end
end