Module: ActiveGenie::CallWrapper

Included in:
BaseModule
Defined in:
lib/active_genie/utils/call_wrapper.rb

Instance Method Summary collapse

Instance Method Details

#callObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/active_genie/utils/call_wrapper.rb', line 5

def call(*, &)
  response = super # Call the original method

  if defined?(config)
    ActiveGenie.logger.call(
      {
        code: self.class.name,
        response: response.to_h
      }, config:
    )
  end

  response
end