Class: TheArrayComparator::TestingHelper::TestData
- Inherits:
-
Object
- Object
- TheArrayComparator::TestingHelper::TestData
- Defined in:
- lib/the_array_comparator/testing_helper/test_data.rb
Instance Method Summary collapse
-
#generate ⇒ Array
Generate the test data.
-
#initialize(dataset) ⇒ TestData
constructor
Create test data instance.
Constructor Details
#initialize(dataset) ⇒ TestData
Create test data instance
9 10 11 12 |
# File 'lib/the_array_comparator/testing_helper/test_data.rb', line 9 def initialize(dataset) @dataset = dataset @data = [] end |
Instance Method Details
#generate ⇒ Array
Generate the test data
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/the_array_comparator/testing_helper/test_data.rb', line 18 def generate if @data.blank? @dataset.count_of_keywords.times do @data.concat @dataset.stripe_of_data @data << @dataset.stripe_of_keywords end #put the rest into the output @data.concat @dataset.raw_data end @data end |