Class: JSONSkooma::Keywords::Applicator::Not

Inherits:
Base
  • Object
show all
Defined in:
lib/json_skooma/keywords/applicator/not.rb

Instance Attribute Summary

Attributes inherited from Base

#json, #parent_schema

Instance Method Summary collapse

Methods inherited from Base

#each_schema, inherited, #initialize, #instance_types, #key, #resolve, set_defaults, #static, value_schema=

Constructor Details

This class inherits a constructor from JSONSkooma::Keywords::Base

Instance Method Details

#evaluate(instance, result) ⇒ Object



10
11
12
13
14
15
# File 'lib/json_skooma/keywords/applicator/not.rb', line 10

def evaluate(instance, result)
  json.evaluate(instance, result)
  return result.success unless result.passed?

  result.failure("The instance must not be valid against the subschema")
end