Sha256: 67e5e0722c74b2df2ac468bfc61008b8381fb86799cc3a44e28276023c4af098

Contents?: true

Size: 410 Bytes

Versions: 1

Compression:

Stored size: 410 Bytes

Contents

module Avro
  module Builder

    class RequiredAttributeError < StandardError
      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
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
avro-builder-0.4.0 lib/avro/builder/errors.rb