Class: HTTP::Session::Options::CookiesOption

Inherits:
Object
  • Object
show all
Includes:
Optionable
Defined in:
lib/http/session/options/cookies_option.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Optionable

#enabled?, #initialize_options

Constructor Details

#initialize(opts) ⇒ CookiesOption

Returns a new instance of CookiesOption.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :jar (HTTP::CookieJar)


12
13
14
15
16
17
18
19
20
21
# File 'lib/http/session/options/cookies_option.rb', line 12

def initialize(opts)
  initialize_options(opts)

  # CookieJar
  @jar =
    if enabled?
      jar = @options[:jar]
      lookup_jar(jar)
    end
end

Instance Attribute Details

#jarObject (readonly)

Returns the value of attribute jar.



8
9
10
# File 'lib/http/session/options/cookies_option.rb', line 8

def jar
  @jar
end