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