Module: ActionFigure::Core::Notifications

Defined in:
lib/action_figure/core.rb,
sig/action_figure.rbs

Overview

ActiveSupport::Notifications instrumentation

Instance Method Summary collapse

Instance Method Details

#notify { ... } ⇒ ActionFigure::response

Yields:

Yield Returns:

  • (ActionFigure::response)

Returns:

  • (ActionFigure::response)


170
171
172
173
174
175
176
177
178
179
180
# File 'lib/action_figure/core.rb', line 170

def notify
  payload = {
    action: name,
    entry_point: entry_point_name
  }
  ActiveSupport::Notifications.instrument("process.action_figure", payload) do
    result = yield
    payload[:status] = result[:status]
    result
  end
end