123456789_123456789_123456789_123456789_123456789_

Class: ActionMailbox::Callbacks::Terminator

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: actionmailbox/lib/action_mailbox/callbacks.rb

Overview

Implements call_direct so that before callbacks don't have to allocate a thunk per invocation (see ::ActiveSupport::Callbacks::Filters::Before).

Instance Method Summary

Instance Method Details

#call(mailbox, chain)

[ GitHub ]

  
# File 'actionmailbox/lib/action_mailbox/callbacks.rb', line 18

def call(mailbox, chain)
  chain.call
  mailbox.finished_processing?
end

#call_direct(mailbox, user_callback, value)

[ GitHub ]

  
# File 'actionmailbox/lib/action_mailbox/callbacks.rb', line 23

def call_direct(mailbox, user_callback, value)
  user_callback.call(mailbox, value)
  mailbox.finished_processing?
end