class JsonSchema::Configuration

Attributes

all_of_sub_errors[RW]
custom_formats[R]
validate_regex_with[R]

Public Class Methods

new() click to toggle source
# File lib/json_schema/configuration.rb, line 24
def initialize
  reset!
end

Public Instance Methods

register_format(name, validator_proc) click to toggle source
# File lib/json_schema/configuration.rb, line 11
def register_format(name, validator_proc)
  @custom_formats[name] = validator_proc
end
reset!() click to toggle source

Used for testing.

# File lib/json_schema/configuration.rb, line 16
def reset!
  @validate_regex_with = nil
  @custom_formats = {}
  @all_of_sub_errors = false
end
validate_regex_with=(validator) click to toggle source
# File lib/json_schema/configuration.rb, line 7
def validate_regex_with=(validator)
  @validate_regex_with = validator
end