Sha256: 395a51ed85e8ce81d0d0a87ae6ed3ba1d76bb31eada473e8b9dd2e5b70cc56c3

Contents?: true

Size: 395 Bytes

Versions: 10

Compression:

Stored size: 395 Bytes

Contents

require 'rom/registry'

module ROM
  # Association set contains a registry with associations defined
  # in schema DSL
  #
  # @api public
  class AssociationSet < ROM::Registry
    # @api private
    def initialize(*)
      super
      elements.values.each do |assoc|
        if assoc.aliased? && !key?(assoc.name)
          elements[assoc.name] = assoc
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rom-core-4.2.1 lib/rom/association_set.rb
rom-core-4.2.0 lib/rom/association_set.rb
rom-core-4.1.2 lib/rom/association_set.rb
rom-core-4.1.1 lib/rom/association_set.rb
rom-core-4.1.0 lib/rom/association_set.rb
rom-core-4.0.2 lib/rom/association_set.rb
rom-core-4.0.1 lib/rom/association_set.rb
rom-core-4.0.0 lib/rom/association_set.rb
rom-core-4.0.0.rc2 lib/rom/association_set.rb
rom-core-4.0.0.rc1 lib/rom/association_set.rb