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
10
# 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))
  vals[:details] = args[0][:details] if (args[0] && args[0].has_key?(:details))
  AuditLog.create vals
end

Instance Method Details

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

Returns:

  • (Boolean)


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

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