Class: Jfuzz::SchemaFuzzer
- Inherits:
-
Object
- Object
- Jfuzz::SchemaFuzzer
- Defined in:
- lib/jfuzz/schema_fuzzer.rb
Instance Method Summary collapse
- #fuzz ⇒ Object
-
#initialize(schema_path) ⇒ SchemaFuzzer
constructor
A new instance of SchemaFuzzer.
Constructor Details
#initialize(schema_path) ⇒ SchemaFuzzer
8 9 10 11 |
# File 'lib/jfuzz/schema_fuzzer.rb', line 8 def initialize(schema_path) @schema_path = schema_path @property_fuzzer = PropertyFuzzer.new end |
Instance Method Details
#fuzz ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/jfuzz/schema_fuzzer.rb', line 13 def fuzz if schema_path.to_s.nil? raise "Schema path cannot be nil or empty" end schema_contents = File.read(schema_path) schema = JSON.parse(schema_contents) property_fuzzer.fuzz_property(schema) end |