Exception: Avro::Builder::UnsupportedBlockAttributeError

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

Instance Method Summary collapse

Constructor Details

#initialize(attribute:, type:, field: nil) ⇒ UnsupportedBlockAttributeError

Returns a new instance of UnsupportedBlockAttributeError.



42
43
44
45
46
47
48
49
50
# File 'lib/avro/builder/errors.rb', line 42

def initialize(attribute:, type:, field: nil)
  target = if field
             "field '#{field}' of type :#{type}"
           else
             "type :#{type}"
           end
  super("'#{attribute}' must be set directly using an option on #{target}, "\
        'not via a block')
end