edge badge
Methods
B
Class Public methods
build(next_callback, user_callback, user_conditions, chain_config)
# File activesupport/lib/active_support/callbacks.rb, line 264
def self.build(next_callback, user_callback, user_conditions, chain_config)
  if chain_config.key?(:terminator) && user_conditions.any?
    halting_and_conditional(next_callback, user_callback, user_conditions)
  elsif chain_config.key? :terminator
    halting(next_callback, user_callback)
  elsif user_conditions.any?
    conditional(next_callback, user_callback, user_conditions)
  else
    simple(next_callback, user_callback)
  end
end