Class: SimpleJSONSchema::Validators::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_json_schema/validators/base.rb

Direct Known Subclasses

Boolean, Null, Numeric, String

Instance Method Summary collapse

Instance Method Details

#valid(scope) ⇒ Object



6
7
8
9
# File 'lib/simple_json_schema/validators/base.rb', line 6

def valid(scope)
  cast(scope) if scope.options[:cast] == true
  validate(scope)
end