lib/spidr/cookie_jar.rb in spidr-0.7.0 vs lib/spidr/cookie_jar.rb in spidr-0.7.1

- old
+ new

@@ -1,7 +1,9 @@ -require 'spidr/page' +# frozen_string_literal: true +require_relative 'page' + require 'set' module Spidr # # Stores HTTP Cookies organized by host-name. @@ -40,12 +42,12 @@ # def each(&block) @params.each(&block) end - # - # Return all relevant cookies in a single string for the + # + # Return all relevant cookies in a single string for the # named host or domain (in browser request format). # # @param [String] host # Host or domain name for cookies. # @@ -57,11 +59,11 @@ # def [](host) @params[host] ||= {} end - # + # # Add a cookie to the jar for a particular domain. # # @param [String] host # Host or domain name to associate with the cookie. # @@ -164,10 +166,10 @@ end return host_cookies end - # + # # Clear out the jar, removing all stored cookies. # # @since 0.2.2 # def clear!