Class: Humid::LogSubscriber

Inherits:
ActiveSupport::LogSubscriber
  • Object
show all
Defined in:
lib/humid/log_subscriber.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.reset_runtimeObject



13
14
15
16
# File 'lib/humid/log_subscriber.rb', line 13

def self.reset_runtime
  rt, self.runtime = runtime, 0
  rt
end

.runtimeObject



9
10
11
# File 'lib/humid/log_subscriber.rb', line 9

def self.runtime
  self.humid_runtime ||= 0
end

.runtime=(value) ⇒ Object



5
6
7
# File 'lib/humid/log_subscriber.rb', line 5

def self.runtime=(value)
  self.humid_runtime = value
end

Instance Method Details

#render(event) ⇒ Object



18
19
20
# File 'lib/humid/log_subscriber.rb', line 18

def render(event)
  self.class.runtime += event.duration
end