Sha256: a8bad4d860fba71d9018fa312dc75850d257e81fd1a70836a0a6a926077e9f6f
Contents?: true
Size: 528 Bytes
Versions: 1
Compression:
Stored size: 528 Bytes
Contents
require 'wisper' module ProxES class Listener def initialize @mutex = Mutex.new end def method_missing(method, *args, &block) vals = { action: method } vals[:user] = args[0][:user] if (args[0] && args[0].has_key?(:user)) vals[:details] = args[0][:details] if (args[0] && args[0].has_key?(:details)) @mutex.synchronize { AuditLog.create vals } end def respond_to_missing?(method, include_private = false) true end end end Wisper.subscribe(ProxES::Listener.new)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
proxes-0.4.0 | lib/proxes/listener.rb |