Class: HTTP::Session::Cookies
- Inherits:
-
Object
- Object
- HTTP::Session::Cookies
- Extended by:
- Forwardable
- Includes:
- MonitorMixin
- Defined in:
- lib/http/session/cookies.rb
Instance Method Summary collapse
-
#enabled? ⇒ Boolean
True when it is enabled.
-
#initialize(options) ⇒ Cookies
constructor
A new instance of Cookies.
-
#read(uri) ⇒ nil, Hash
Read cookies.
-
#write(res) ⇒ void
Write cookies.
Constructor Details
#initialize(options) ⇒ Cookies
Returns a new instance of Cookies.
12 13 14 15 |
# File 'lib/http/session/cookies.rb', line 12 def initialize() super() @options = end |
Instance Method Details
#enabled? ⇒ Boolean
True when it is enabled.
9 |
# File 'lib/http/session/cookies.rb', line 9 def_delegator :@options, :enabled? |
#read(uri) ⇒ nil, Hash
Read cookies.
20 21 22 23 24 |
# File 'lib/http/session/cookies.rb', line 20 def read(uri) synchronize do (uri) end end |
#write(res) ⇒ void
This method returns an undefined value.
Write cookies.
30 31 32 33 34 |
# File 'lib/http/session/cookies.rb', line 30 def write(res) synchronize do (res) end end |