Class: Bullet::Registry::Object
- Defined in:
- lib/bullet/registry/object.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#[], #delete, #each, #initialize, #select
Constructor Details
This class inherits a constructor from Bullet::Registry::Base
Instance Method Details
#add(object_or_objects) ⇒ Object
4 5 6 7 8 |
# File 'lib/bullet/registry/object.rb', line 4 def add( object_or_objects ) klazz = object_or_objects.is_a?( Array ) ? object_or_objects.first.class : object_or_objects.class super( klazz, object_or_objects ) end |
#contains?(object) ⇒ Boolean
10 11 12 |
# File 'lib/bullet/registry/object.rb', line 10 def contains?( object ) @registry[object.class] and @registry[object.class].include?( object ) end |