Class: Bullet::Notification::UnusedEagerLoading

Inherits:
Object
  • Object
show all
Defined in:
lib/bullet-board/ext/notification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(callers, base_class, associations, path = nil) ⇒ UnusedEagerLoading

Returns a new instance of UnusedEagerLoading.



9
10
11
12
13
14
# File 'lib/bullet-board/ext/notification.rb', line 9

def initialize callers, base_class, associations, path = nil
  super base_class, associations, path

  @callers = callers
  @counter = 0
end

Instance Attribute Details

#counterObject

Returns the value of attribute counter.



7
8
9
# File 'lib/bullet-board/ext/notification.rb', line 7

def counter
  @counter
end

Instance Method Details

#notification_dataObject



16
17
18
19
20
21
22
23
# File 'lib/bullet-board/ext/notification.rb', line 16

def notification_data
  if self.notifier == UniformNotifier::CustomizedLogger
    self.counter += 1
    puts "Call UnusedEagerLoading count: #{self.counter}"
  end

  super
end