Sha256: 6b31fc856c77a59a2989b5853eeebbb760fb195aa25fc9383ca51685a5227e34

Contents?: true

Size: 432 Bytes

Versions: 7

Compression:

Stored size: 432 Bytes

Contents

# frozen_string_literal: true

require 'avro/builder/dsl_attributes'

module Avro
  module Builder

    # This is a shared concern for objects that support aliases via the DSL.
    module Aliasable
      def self.included(base)
        base.dsl_attribute(:aliases) do |*names|
          if !names.empty?
            @aliases = names.flatten
          else
            @aliases
          end
        end
      end
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
avro-builder-2.1.0 lib/avro/builder/aliasable.rb
avro-builder-2.0.0 lib/avro/builder/aliasable.rb
avro-builder-1.1.0 lib/avro/builder/aliasable.rb
avro-builder-1.0.1 lib/avro/builder/aliasable.rb
avro-builder-1.0.0 lib/avro/builder/aliasable.rb
avro-builder-0.17.0 lib/avro/builder/aliasable.rb
avro-builder-0.16.2 lib/avro/builder/aliasable.rb