Method: SimpleJSONSchema::Checker.const

Defined in:
lib/simple_json_schema/checker.rb

.const(scope) ⇒ Object



38
39
40
41
42
# File 'lib/simple_json_schema/checker.rb', line 38

def const(scope)
  return if scope.segment.is_a?(Array)

  scope.error(:const) if scope.key?(:const) && scope[:const] != scope.value
end