Sha256: b15dc3a6798fdf304d1610fa2325d23a884a32c8e09fc53d87cdab619047735e

Contents?: true

Size: 470 Bytes

Versions: 18

Compression:

Stored size: 470 Bytes

Contents

module JsonSchema
  class Configuration
    attr_reader :custom_formats
    attr_reader :validate_regex_with

    def validate_regex_with=(validator)
      @validate_regex_with = validator
    end

    def register_format(name, validator_proc)
      @custom_formats[name] = validator_proc
    end

    # Used for testing.
    def reset!
      @validate_regex_with = nil
      @custom_formats = {}
    end

    private

    def initialize
      reset!
    end

  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
json_schema-0.14.4 lib/json_schema/configuration.rb
json_schema-0.14.3 lib/json_schema/configuration.rb
json_schema-0.14.1 lib/json_schema/configuration.rb
json_schema-0.14.0 lib/json_schema/configuration.rb
json_schema-0.13.6 lib/json_schema/configuration.rb
json_schema-0.13.5 lib/json_schema/configuration.rb
json_schema-0.13.4 lib/json_schema/configuration.rb
json_schema-0.13.3 lib/json_schema/configuration.rb
json_schema-0.13.2 lib/json_schema/configuration.rb
json_schema-0.13.0 lib/json_schema/configuration.rb
json_schema-0.12.5 lib/json_schema/configuration.rb
json_schema-0.12.4 lib/json_schema/configuration.rb
json_schema-0.12.3 lib/json_schema/configuration.rb
json_schema-0.12.2 lib/json_schema/configuration.rb
json_schema-0.12.1 lib/json_schema/configuration.rb
json_schema-0.12.0 lib/json_schema/configuration.rb
json_schema-0.11.0 lib/json_schema/configuration.rb
json_schema-0.10.0 lib/json_schema/configuration.rb