Exception: Avro::Builder::RequiredAttributeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/avro/builder/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(type:, attribute:, field: nil, name: nil) ⇒ RequiredAttributeError


5
6
7
8
9
10
11
12
# File 'lib/avro/builder/errors.rb', line 5

def initialize(type:, attribute:, field: nil, name: nil)
  location = if field
               "field '#{field}' of "
             elsif name
               "'#{name}' of "
             end
  super("attribute :#{attribute} missing for #{location}type :#{type}")
end