Class: Jfuzz::ArrayGenerator
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Generator
#initialize, #try_generate
Class Method Details
.type ⇒ Object
18
19
20
|
# File 'lib/jfuzz/generators/array_generator.rb', line 18
def self.type
"array"
end
|
Instance Method Details
#generate ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/jfuzz/generators/array_generator.rb', line 7
def generate
unless items.any?
raise "Cannot generate an empty array. Please specify item types"
end
if items.kind_of?(Array)
return tuple_array
end
random_array
end
|