class ActiveSupport::CurrentAttributes

def before_reset(&block)

Calls this block before #reset is called on the instance. Used for resetting external collaborators that depend on current values.
def before_reset(&block)
  set_callback :reset, :before, &block
end