Module: NCore::LogSubscriber::ClassMethods

Defined in:
lib/ncore/rails/log_subscriber.rb

Instance Method Summary collapse

Instance Method Details

#reset_runtimeObject



23
24
25
26
# File 'lib/ncore/rails/log_subscriber.rb', line 23

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

#runtimeObject



19
20
21
# File 'lib/ncore/rails/log_subscriber.rb', line 19

def runtime
  Thread.current[runtime_variable] ||= 0
end

#runtime=(value) ⇒ Object



15
16
17
# File 'lib/ncore/rails/log_subscriber.rb', line 15

def runtime=(value)
  Thread.current[runtime_variable] = value
end