Class: Jfuzz::ObjectGenerator
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/object_generator.rb', line 18
def self.type
"object"
end
|
Instance Method Details
#generate ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/jfuzz/generators/object_generator.rb', line 7
def generate
result = {}
required_keys = property.fetch("required", [])
property["properties"].each do |key, value|
next if skip?(key, required_keys)
result[key] = property_fuzzer.fuzz_property(value)
end
result
end
|