Sha256: 1e1ebe8715e12297bbd317ada93e4e8f2c435ff15354d53452e4874760cf037c

Contents?: true

Size: 272 Bytes

Versions: 1

Compression:

Stored size: 272 Bytes

Contents

require "regxing"

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

1 entries across 1 versions & 1 rubygems

Version Path
json_test_data-0.3.0.beta lib/json_test_data/data_structures/string.rb