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
6 7 8 |
# File 'lib/bullet/registry/association.rb', line 6 def merge(base, associations) @registry.merge!(base => associations) end |
#similarly_associated(base, associations) ⇒ Object
10 11 12 13 |
# File 'lib/bullet/registry/association.rb', line 10 def similarly_associated(base, associations) @registry.select { |key, value| key.include?(base) && value == associations } .collect(&:first).flatten end |