Class: JsonTestData::String
- Inherits:
-
Object
- Object
- JsonTestData::String
- Extended by:
- RegXing
- Defined in:
- lib/json_test_data/data_structures/string.rb
Class Method Summary collapse
Class Method Details
.create(schema) ⇒ Object
6 7 8 9 |
# File 'lib/json_test_data/data_structures/string.rb', line 6 def create(schema) len = schema.fetch(:maxLength, nil) || schema.fetch(:minLength, nil) || 1 Generator.new(/.{#{len}}/).generate! end |