class Patron::Request

def max_redirects=(new_max_redirects)

Parameters:
  • new_max_redirects (Integer) -- The number of redirects to follow, or `-1` for unlimited redirects.
def max_redirects=(new_max_redirects)
  if new_max_redirects.to_i < -1
    raise ArgumentError, "Max redirects must be a positive integer, 0 or -1"
  end
  @max_redirects = new_max_redirects.to_i
end