Class: Bullet::Notification::NPlusOneQuery
- Inherits:
-
Object
- Object
- Bullet::Notification::NPlusOneQuery
- Defined in:
- lib/bullet-board/ext/notification.rb
Instance Attribute Summary collapse
-
#counter ⇒ Object
Returns the value of attribute counter.
Instance Method Summary collapse
-
#initialize(callers, base_class, associations, path = nil) ⇒ NPlusOneQuery
constructor
A new instance of NPlusOneQuery.
- #notification_data ⇒ Object
Constructor Details
#initialize(callers, base_class, associations, path = nil) ⇒ NPlusOneQuery
Returns a new instance of NPlusOneQuery.
29 30 31 32 33 34 |
# File 'lib/bullet-board/ext/notification.rb', line 29 def initialize callers, base_class, associations, path = nil super base_class, associations, path @callers = callers @counter = 0 end |
Instance Attribute Details
#counter ⇒ Object
Returns the value of attribute counter.
27 28 29 |
# File 'lib/bullet-board/ext/notification.rb', line 27 def counter @counter end |
Instance Method Details
#notification_data ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/bullet-board/ext/notification.rb', line 36 def notification_data if self.notifier == UniformNotifier::CustomizedLogger self.counter += 1 puts "Call NPlusOneQuery count: #{self.counter}" end super end |