Sha256: bf343562de23a1f9b517003f9bf8aa247401c1883c47108638de8b8d5b4d6fdf

Contents?: true

Size: 401 Bytes

Versions: 14

Compression:

Stored size: 401 Bytes

Contents

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

14 entries across 14 versions & 1 rubygems

Version Path
avro-builder-0.16.1 lib/avro/builder/aliasable.rb
avro-builder-0.16.0 lib/avro/builder/aliasable.rb
avro-builder-0.15.0 lib/avro/builder/aliasable.rb
avro-builder-0.15.0.rc0 lib/avro/builder/aliasable.rb
avro-builder-0.14.1 lib/avro/builder/aliasable.rb
avro-builder-0.14.0 lib/avro/builder/aliasable.rb
avro-builder-0.13.0 lib/avro/builder/aliasable.rb
avro-builder-0.12.0 lib/avro/builder/aliasable.rb
avro-builder-0.11.0 lib/avro/builder/aliasable.rb
avro-builder-0.10.0 lib/avro/builder/aliasable.rb
avro-builder-0.9.0 lib/avro/builder/aliasable.rb
avro-builder-0.8.0 lib/avro/builder/aliasable.rb
avro-builder-0.7.0 lib/avro/builder/aliasable.rb
avro-builder-0.6.0 lib/avro/builder/aliasable.rb