class RailsBand::ActionController::Event::ProcessAction

A wrapper for the event that is passed to ‘process_action.action_controller`.

Public Instance Methods

action() click to toggle source
# File lib/rails_band/action_controller/event/process_action.rb, line 12
def action
  @action ||= @event.payload.fetch(:action)
end
controller() click to toggle source
# File lib/rails_band/action_controller/event/process_action.rb, line 8
def controller
  @controller ||= @event.payload.fetch(:controller)
end
db_runtime() click to toggle source
# File lib/rails_band/action_controller/event/process_action.rb, line 64
def db_runtime
  return @db_runtime if defined? @db_runtime

  @db_runtime = @event.payload[:db_runtime]
end
format() click to toggle source
# File lib/rails_band/action_controller/event/process_action.rb, line 24
def format
  @format ||= @event.payload.fetch(:format)
end
headers() click to toggle source
# File lib/rails_band/action_controller/event/process_action.rb, line 20
def headers
  @headers ||= @event.payload.fetch(:headers)
end
method() click to toggle source
# File lib/rails_band/action_controller/event/process_action.rb, line 28
def method
  @method ||= @event.payload.fetch(:method)
end
params() click to toggle source
# File lib/rails_band/action_controller/event/process_action.rb, line 16
def params
  @params ||= @event.payload.fetch(:params).except(*INTERNAL_PARAMS)
end
path() click to toggle source
# File lib/rails_band/action_controller/event/process_action.rb, line 32
def path
  @path ||= @event.payload.fetch(:path).split('?', 2).first
end
status() click to toggle source
# File lib/rails_band/action_controller/event/process_action.rb, line 36
def status
  @status ||=
    begin
      status = @event.payload[:status]

      if status.nil? && (exception_class_name = @event.payload[:exception]&.first)
        status = ::ActionDispatch::ExceptionWrapper.status_code_for_exception(exception_class_name)
      end
      status
    end
end
view_runtime() click to toggle source
# File lib/rails_band/action_controller/event/process_action.rb, line 48
def view_runtime
  @view_runtime ||= @event.payload.fetch(:view_runtime)
end