Sha256: 33736c7692f0e2cf6554c96d2a2702dec0e7c72bd6a5403f56e20cf705a4712c

Contents?: true

Size: 253 Bytes

Versions: 6

Compression:

Stored size: 253 Bytes

Contents

module JsonTestData
  class String
    extend RegXing

    class << self
      def create(schema)
        len = schema.fetch(:maxLength, nil) || schema.fetch(:minLength, nil) || 1
        Generator.new(/.{#{len}}/).generate!
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
json_test_data-0.7.0 lib/json_test_data/data_structures/string.rb
json_test_data-0.6.0 lib/json_test_data/data_structures/string.rb
json_test_data-0.5.1 lib/json_test_data/data_structures/string.rb
json_test_data-0.5.0 lib/json_test_data/data_structures/string.rb
json_test_data-0.4.0 lib/json_test_data/data_structures/string.rb
json_test_data-0.4.0.beta lib/json_test_data/data_structures/string.rb