Class: ProxES::Listener

Inherits:
Object
  • Object
show all
Defined in:
lib/proxes/listener.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



5
6
7
8
9
# File 'lib/proxes/listener.rb', line 5

def method_missing(method, *args, &block)
  vals = { action: method }
  vals[:user] = args[0][:user] if (args[0] && args[0].has_key?(:user))
  AuditLog.create vals
end

Instance Method Details

#respond_to_missing?(method, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/proxes/listener.rb', line 11

def respond_to_missing?(method, include_private = false)
  true
end