Sha256: 61681c5dab459bb91f016e696889ee378b90bb8b3590b30a0b44ee9b6b6546fd

Contents?: true

Size: 381 Bytes

Versions: 3

Compression:

Stored size: 381 Bytes

Contents

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bullet-2.2.1 lib/bullet/registry/association.rb
bullet-2.2.0 lib/bullet/registry/association.rb
bullet-2.1.0 lib/bullet/registry/association.rb