class ActionAudit::Factory

Public Class Methods

add_change(*args) click to toggle source
# File lib/action_audit/factory.rb, line 27
def add_change(*args)
  current.add_change(*args) if current
end
add_params(*args) click to toggle source
# File lib/action_audit/factory.rb, line 23
def add_params(*args)
  current.add_params(*args) if current
end
current() click to toggle source
# File lib/action_audit/factory.rb, line 3
def current
  Thread.current[:action_auditor]
end
flush() click to toggle source
# File lib/action_audit/factory.rb, line 11
def flush
  Thread.current[:action_auditor] = nil
end
start() click to toggle source
# File lib/action_audit/factory.rb, line 7
def start
  Thread.current[:action_auditor] = ActionAudit::EventProcessor.new(ActionAudit.store)
end
with_auditor(params = {}) { || ... } click to toggle source
# File lib/action_audit/factory.rb, line 15
def with_auditor(params = {})
  start
  add_params(params)
  yield
ensure
  flush
end