Class: HTTP::Session::Options::CookiesOption
- Inherits:
-
Object
- Object
- HTTP::Session::Options::CookiesOption
- Defined in:
- lib/http/session/options/cookies_option.rb
Instance Method Summary collapse
-
#enabled? ⇒ Boolean
Indicates whether or not the session cookie feature is enabled.
-
#initialize(options) ⇒ CookiesOption
constructor
A new instance of CookiesOption.
Constructor Details
permalink #initialize(options) ⇒ CookiesOption
Returns a new instance of CookiesOption.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/http/session/options/cookies_option.rb', line 5 def initialize() = case when nil, false then {enabled: false} when true then {enabled: true} else end @enabled = .fetch(:enabled, true) end |
Instance Method Details
permalink #enabled? ⇒ Boolean
Indicates whether or not the session cookie feature is enabled.
17 18 19 |
# File 'lib/http/session/options/cookies_option.rb', line 17 def enabled? @enabled end |