Class: FDIC::BankFind::SchemaValidators::BaseValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/fdic/bank_find/schema_validators/base_validator.rb

Instance Method Summary collapse

Instance Method Details

#schema_valid!Object



10
11
12
13
14
# File 'lib/fdic/bank_find/schema_validators/base_validator.rb', line 10

def schema_valid!
  JSON::Validator.validate!(schema, response)
  #JSON::Validator.validate! will return true if it is successful, or raise if there is an error. Swallow true and return nil otherwise
  nil
end

#schema_valid?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/fdic/bank_find/schema_validators/base_validator.rb', line 6

def schema_valid?
  JSON::Validator.validate(schema, response)
end