class

Vug::LoopState

Inherits Reference < Object

Mutable state threaded through the fetch loop, replacing scattered local variables and positional tuple returns.

NOT thread-safe. Each Fetcher#fetch call must create its own instance. Do not share across fibers.

Owns the per-request state for a single Fetcher#fetch call: the URL being chased, the redirect/gray-placeholder counters, the visited-set used to detect redirect loops, the initial DNS resolutions used to detect DNS rebinding, and the start time used to enforce the timeout.

Constructors

new(initial_url : String, start_time : Time::Instant)
Source

Instance methods

current_uri
Source
current_uri=(current_uri : URI | Nil)
Source
current_url
Source
current_url=(current_url : String)
Source
gray_placeholder_attempts
Source
gray_placeholder_attempts=(gray_placeholder_attempts : Int32)
Source
initial_dns_ips
Source
initial_url
Source
redirects
Source
redirects=(redirects : Int32)
Source
start_time
Source
visited_urls
Source