Class: JsonSchema::Configuration
- Inherits:
-
Object
- Object
- JsonSchema::Configuration
- Defined in:
- lib/json_schema/configuration.rb
Instance Attribute Summary collapse
-
#all_of_sub_errors ⇒ Object
Returns the value of attribute all_of_sub_errors.
-
#custom_formats ⇒ Object
readonly
Returns the value of attribute custom_formats.
-
#validate_regex_with ⇒ Object
Returns the value of attribute validate_regex_with.
Instance Method Summary collapse
- #register_format(name, validator_proc) ⇒ Object
-
#reset! ⇒ Object
Used for testing.
Instance Attribute Details
#all_of_sub_errors ⇒ Object
Returns the value of attribute all_of_sub_errors.
3 4 5 |
# File 'lib/json_schema/configuration.rb', line 3 def all_of_sub_errors @all_of_sub_errors end |
#custom_formats ⇒ Object (readonly)
Returns the value of attribute custom_formats.
4 5 6 |
# File 'lib/json_schema/configuration.rb', line 4 def custom_formats @custom_formats end |
#validate_regex_with ⇒ Object
Returns the value of attribute validate_regex_with.
5 6 7 |
# File 'lib/json_schema/configuration.rb', line 5 def validate_regex_with @validate_regex_with end |
Instance Method Details
#register_format(name, validator_proc) ⇒ Object
11 12 13 |
# File 'lib/json_schema/configuration.rb', line 11 def register_format(name, validator_proc) @custom_formats[name] = validator_proc end |
#reset! ⇒ Object
Used for testing.
16 17 18 19 20 |
# File 'lib/json_schema/configuration.rb', line 16 def reset! @validate_regex_with = nil @custom_formats = {} @all_of_sub_errors = false end |