Sha256: b8ed2a5114cc722830e60cf9daa32f2bbb64eb614d1c0a8439ab20c48bf6ec34

Contents?: true

Size: 411 Bytes

Versions: 5

Compression:

Stored size: 411 Bytes

Contents

class Mechanize
  # Thrown when too many redirects are sent
  class RedirectLimitReachedError < RuntimeError
    attr_reader :page, :response_code, :redirects
    def initialize(page, redirects)
      @page           = page
      @redirects      = redirects
      @response_code  = page.code
    end

    def to_s
      "Maximum redirect limit (#{redirects}) reached"
    end
    alias :inspect :to_s
  end
end

Version data entries

5 entries across 5 versions & 4 rubygems

Version Path
kitamomonga-mechanize-0.9.3.20090724215219 lib/mechanize/redirect_limit_reached_error.rb
tenderlove-mechanize-0.9.3.20090911221705 lib/mechanize/redirect_limit_reached_error.rb
domo-0.0.4 vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/redirect_limit_reached_error.rb
mechanize-1.0.1.beta.20110107104205 lib/mechanize/redirect_limit_reached_error.rb
mechanize-1.0.0 lib/mechanize/redirect_limit_reached_error.rb