class Avro::SchemaValidator::Result

Public Instance Methods

<<(error) click to toggle source
   # File lib/avro/schema_validator.rb
36 def <<(error)
37   errors << error
38 end
add_error(path, message) click to toggle source
   # File lib/avro/schema_validator.rb
40 def add_error(path, message)
41   self << "at #{path} #{message}"
42 end
errors() click to toggle source
   # File lib/avro/schema_validator.rb
52 def errors
53   # Use less memory for success results by lazily creating the errors array
54   @errors ||= []
55 end
failure?() click to toggle source
   # File lib/avro/schema_validator.rb
44 def failure?
45   defined?(@errors) && errors.any?
46 end
to_s() click to toggle source
   # File lib/avro/schema_validator.rb
48 def to_s
49   failure? ? errors.join("\n") : ''
50 end