class ActiveSupport::SecureCompareRotator

def secure_compare!(other_value, on_rotation: @on_rotation)

def secure_compare!(other_value, on_rotation: @on_rotation)
  if secure_compare(@value, other_value)
    true
  elsif @rotate_values.any? { |value| secure_compare(value, other_value) }
    on_rotation&.call
    true
  else
    raise InvalidMatch
  end
end