Sha256: 61a3785ea458814daa7330b3125e3e679ab73348d6810942f844c75d6d17a01c

Contents?: true

Size: 474 Bytes

Versions: 9

Compression:

Stored size: 474 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|
        elements[assoc.name] = assoc if assoc.aliased? && !key?(assoc.name)
      end
    end
    ruby2_keywords(:initialize) if respond_to?(:ruby2_keywords, true)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rom-core-5.3.2 lib/rom/association_set.rb
rom-core-5.3.1 lib/rom/association_set.rb
rom-core-5.3.0 lib/rom/association_set.rb
rom-core-5.2.6 lib/rom/association_set.rb
rom-core-5.2.5 lib/rom/association_set.rb
rom-core-5.2.4 lib/rom/association_set.rb
rom-core-5.2.3 lib/rom/association_set.rb
rom-core-5.2.2 lib/rom/association_set.rb
rom-core-5.2.1 lib/rom/association_set.rb