Method: Avromatic::Model::Validation#avro_validate!

Defined in:
lib/avromatic/model/validation.rb

#avro_validate!Object



44
45
46
47
48
49
50
# File 'lib/avromatic/model/validation.rb', line 44

def avro_validate!
  results = missing_avro_attributes
  if results.present?
    raise Avromatic::Model::ValidationError.new("#{self.class.name}(#{attributes.inspect}) cannot be " \
      "serialized because the following attributes are nil: #{results.join(', ')}")
  end
end