Class: Bullet::Detector::Counter

Inherits:
Base
  • Object
show all
Defined in:
lib/bullet/detector/counter.rb

Class Method Summary collapse

Methods inherited from Base

end_request, start_request

Class Method Details

.add_counter_cache(object, associations) ⇒ Object



9
10
11
12
13
# File 'lib/bullet/detector/counter.rb', line 9

def self.add_counter_cache(object, associations)
  if conditions_met?( object, associations )
    create_notification object.class, associations
  end
end

.add_impossible_object(object) ⇒ Object



19
20
21
# File 'lib/bullet/detector/counter.rb', line 19

def self.add_impossible_object(object)
  impossible_objects.add object
end

.add_possible_objects(objects) ⇒ Object



15
16
17
# File 'lib/bullet/detector/counter.rb', line 15

def self.add_possible_objects(objects)
  possible_objects.add objects
end

.clearObject



4
5
6
7
# File 'lib/bullet/detector/counter.rb', line 4

def self.clear
  @@possible_objects = nil
  @@impossible_objects = nil
end