Class: AbstractorCreator
- Inherits:
-
Object
- Object
- AbstractorCreator
- Defined in:
- lib/factory/test/combination/abstract_creator.rb
Direct Known Subclasses
Instance Method Summary collapse
- #create ⇒ Object
- #export ⇒ Object
-
#initialize(input_file, output_file) ⇒ AbstractorCreator
constructor
A new instance of AbstractorCreator.
- #read_csv ⇒ Object
- #write_csv ⇒ Object
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
#create ⇒ Object
23 24 |
# File 'lib/factory/test/combination/abstract_creator.rb', line 23 def create end |
#export ⇒ Object
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_csv ⇒ Object
19 20 21 |
# File 'lib/factory/test/combination/abstract_creator.rb', line 19 def read_csv @csv_rows = CSV.read(@input_file) end |
#write_csv ⇒ Object
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 |