Sha256: 6b558c838f57ddc28a5de9e18c03b83e8ae4331d0ac3b63445d528a1454059db

Contents?: true

Size: 376 Bytes

Versions: 23

Compression:

Stored size: 376 Bytes

Contents

# frozen_string_literal: true

module Bullet
  module Registry
    class Association < Base
      def merge(base, associations)
        @registry.merge!(base => associations)
      end

      def similarly_associated(base, associations)
        @registry.select { |key, value| key.include?(base) && value == associations }.collect(&:first).flatten
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
bullet-7.1.0 lib/bullet/registry/association.rb
bullet-7.0.7 lib/bullet/registry/association.rb
bullet-7.0.6 lib/bullet/registry/association.rb
bullet-7.0.5 lib/bullet/registry/association.rb
bullet-7.0.4 lib/bullet/registry/association.rb
bullet-7.0.3 lib/bullet/registry/association.rb
bullet-7.0.2 lib/bullet/registry/association.rb
bullet-7.0.1 lib/bullet/registry/association.rb
bullet-7.0.0 lib/bullet/registry/association.rb
bullet-6.1.5 lib/bullet/registry/association.rb
bullet-6.1.4 lib/bullet/registry/association.rb
bullet-6.1.3 lib/bullet/registry/association.rb
bullet-6.1.2 lib/bullet/registry/association.rb
bullet-6.1.1 lib/bullet/registry/association.rb
bullet-6.1.0 lib/bullet/registry/association.rb
bullet-6.0.2 lib/bullet/registry/association.rb
bullet-6.0.1 lib/bullet/registry/association.rb
bullet-6.0.0 lib/bullet/registry/association.rb
bullet-5.9.0 lib/bullet/registry/association.rb
bullet-5.8.1 lib/bullet/registry/association.rb