Class: TimeBandits::TimeConsumers::Beetle::Subscriber

Inherits:
ActiveSupport::LogSubscriber
  • Object
show all
Defined in:
lib/time_bandits/time_consumers/beetle.rb

Instance Method Summary collapse

Instance Method Details

#publish(event) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/time_bandits/time_consumers/beetle.rb', line 15

def publish(event)

  i = Beetle.instance
  i.time += event.duration
  i.calls += 1

  return unless logger.debug?

  debug "%s (%.2fms)" % ["Beetle publish", event.duration]
end