Class: VCAP::JsonSchema::BaseSchema

Inherits:
Object
  • Object
show all
Defined in:
lib/vcap/json_schema.rb

Overview

Defines an interface that all schemas must implement

Direct Known Subclasses

ArraySchema, BoolSchema, HashSchema, TypeSchema

Instance Method Summary collapse

Instance Method Details

#validate(dec_json) ⇒ Object

Verfies that val conforms to the schema being validated Throws exceptions derived from ValidationError upon schema violations

Parameters:

  • Object

    val An object decoded from json

Returns:

  • nil

Raises:

  • (NotImplementedError)


58
59
60
# File 'lib/vcap/json_schema.rb', line 58

def validate(dec_json)
  raise NotImplementedError.new("You must implement validate")
end