Class: Bullet::Registry::Association
- Defined in:
- lib/bullet/registry/association.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#[], #add, #delete, #each, #include?, #initialize, #select
Constructor Details
This class inherits a constructor from Bullet::Registry::Base
Instance Method Details
#merge(base, associations) ⇒ Object
4 5 6 |
# File 'lib/bullet/registry/association.rb', line 4 def merge(base, associations) @registry.merge!(base => associations) end |
#similarly_associated(base, associations) ⇒ Object
8 9 10 |
# File 'lib/bullet/registry/association.rb', line 8 def similarly_associated(base, associations) @registry.select { |key, value| key.include?(base) && value == associations }.collect(&:first).flatten end |