Sha256: 1d2edd31227cf3d21a916a9e0ac58ca22eec42dfd8009cba017ef38b4e24a411

Contents?: true

Size: 426 Bytes

Versions: 6

Compression:

Stored size: 426 Bytes

Contents

# frozen_string_literal: true

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

6 entries across 6 versions & 1 rubygems

Version Path
rom-core-5.1.2 lib/rom/association_set.rb
rom-core-5.1.1 lib/rom/association_set.rb
rom-core-5.1.0 lib/rom/association_set.rb
rom-core-5.0.2 lib/rom/association_set.rb
rom-core-5.0.1 lib/rom/association_set.rb
rom-core-5.0.0 lib/rom/association_set.rb